diff --git a/context.core.inc b/context.core.inc
index b1ea2b0..76f903d 100644
--- a/context.core.inc
+++ b/context.core.inc
@@ -331,9 +331,6 @@ function context_context_page_condition() {
  * Implementation of hook_context_page_reaction().
  */
 function context_context_page_reaction() {
-  if ($plugin = context_get_plugin('reaction', 'breadcrumb')) {
-    $plugin->execute();
-  }
   if ($plugin = context_get_plugin('reaction', 'css_injector')) {
     $plugin->execute();
   }
@@ -346,9 +343,6 @@ function context_context_page_reaction() {
  * Implementation of hook_preprocess_page().
  */
 function context_preprocess_page(&$vars) {
-  if ($plugin = context_get_plugin('reaction', 'menu')) {
-    $plugin->execute($vars);
-  }
   if ($plugin = context_get_plugin('reaction', 'theme')) {
     $plugin->execute($vars);
   }
@@ -363,6 +357,19 @@ function context_preprocess_page(&$vars) {
 }
 
 /**
+* Implementation of hook_delivery_callback_alter().
+* Based on menu_position's and menu_trail_by_path's implementations.
+*/
+function context_page_delivery_callback_alter() {
+  if ($plugin = context_get_plugin('reaction', 'menu')) {
+    $plugin->execute();
+  }
+  if ($plugin = context_get_plugin('reaction', 'breadcrumb')) {
+    $plugin->execute();
+  }
+}
+
+/**
  * Implementation of hook_preprocess_html().
  */
 function context_preprocess_html(&$vars) {
diff --git a/sites/all/modules/contrib/context/plugins/context_reaction_breadcrumb.inc b/sites/all/modules/contrib/context/plugins/context_reaction_breadcrumb.inc
index cc58b09..66d121c 100644
--- a/plugins/context_reaction_breadcrumb.inc
+++ b/plugins/context_reaction_breadcrumb.inc
@@ -5,34 +5,29 @@
  */
 class context_reaction_breadcrumb extends context_reaction_menu {
   /**
-   * Override of execute().
+   * Overrides set_active_trail_from_link to set the breadcrumb instead of the menu path.
    */
-  function execute(&$vars = NULL) {
-    if ($active_paths = $this->get_active_paths()) {
-      $breadcrumb = array(l(t('Home'), '<front>', array('purl' => array('disabled' => TRUE))));
-      foreach ($active_paths as $path) {
-        $result = db_select('menu_links')
-          ->fields('menu_links', array('p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7', 'p8'))
-          ->condition('hidden', 0)
-          ->condition('link_path', $path)
-          ->execute();
-        while ($parents = $result->fetchAssoc()) {
-          $set = FALSE;
-          foreach (array_filter($parents) as $plid) {
-            $parent = menu_link_load($plid);
-            if ($parent && $parent['access'] && empty($parent['hidden']) && !empty($parent['title'])) {
-              $set = TRUE;
-              $breadcrumb[] = l($this->get_link_title($parent), $parent['href']);
-            }
-          }
-          // Only set the breadcrumb if one or more links were added to the
-          // trail. If not, continue iterating through possible menu links.
-          if ($set) {
-            drupal_set_breadcrumb($breadcrumb);
-            break;
-          }
+  function set_active_trail_from_link($item) {
+    $result = db_select('menu_links')
+      ->fields('menu_links', array('p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7', 'p8'))
+      ->condition('hidden', 0)
+      ->condition('link_path', $item['link_path'])
+      ->execute();
+    while ($parents = $result->fetchAssoc()) {
+      $set = FALSE;
+      foreach (array_filter($parents) as $plid) {
+        $parent = menu_link_load($plid);
+        if ($parent && $parent['access'] && empty($parent['hidden']) && !empty($parent['title'])) {
+          $set = TRUE;
+          $breadcrumb[] = l($parent['title'], $parent['href']);
         }
       }
+      // Only set the breadcrumb if one or more links were added to the
+      // trail. If not, continue iterating through possible menu links.
+      if ($set) {
+        drupal_set_breadcrumb($breadcrumb);
+        break;
+      }
     }
   }
   /**
diff --git a/sites/all/modules/contrib/context/plugins/context_reaction_menu.inc b/sites/all/modules/contrib/context/plugins/context_reaction_menu.inc
index e51143b..1118ec3 100644
--- a/plugins/context_reaction_menu.inc
+++ b/plugins/context_reaction_menu.inc
@@ -8,35 +8,33 @@ class context_reaction_menu extends context_reaction {
    * Provide a form element that allow the admin to chose a menu item.
    */
   function options_form($context) {
+    $options = array("-- " . t('None') . " --");
     if (module_exists('menu')) {
       $menus = menu_parent_options(menu_get_menus(), array('mlid' => 0));
-      $root_menus = array();
-      foreach ($menus as $key => $name) {
-        $id = explode(':', $key);
-        if ($id[1] == '0') {
-          $root_menus[$id[0]] = check_plain($name);
+      $menu_names = array();
+      foreach ($menus as $id => $title) {
+        list($menu_name, $mlid) = explode(':', $id);
+        // Store the title each menu for reference.
+        if ($mlid == '0') {
+          $menu_names[$menu_name] = check_plain($title);
         }
         else {
-          $link = menu_link_load($id[1]);
+          $link = menu_link_load($mlid);
           $identifier = $link['link_path'];
-          $root_menu = $root_menus[$id[0]];
-          while (isset($menus[$root_menu][$identifier])) {
+          $root_menu = $menu_names[$menu_name];
+          while (isset($options[$root_menu][$identifier])) {
             $identifier .= "'";
           }
-          $menus[$root_menu][$identifier] = $name;
+          $options[$root_menu][$menu_name . ':' . $identifier] = $title;
         }
-        unset($menus[$key]);
       }
-      array_unshift($menus, "-- " . t('None') . " --");
-    }
-    else {
-      $menus = array();
     }
     return array(
       '#title' => $this->title,
       '#description' => $this->description,
-      '#options' => $menus,
+      '#options' => $options,
       '#type' => 'select',
+      '#multiple' => TRUE,
       '#default_value' => $this->fetch_from_context($context),
     );
   }
@@ -46,97 +44,100 @@ class context_reaction_menu extends context_reaction {
    * Trim any identifier padding for non-unique path menu items.
    */
   function options_form_submit($values) {
-    return trim($values, "'");
+    $trimmed = array();
+    foreach ($values as $value) {
+      $value = trim($value, "'");
+      $trimmed[] = $value;
+    }
+    return $trimmed;
   }
 
   /**
-   * If primary + secondary links are pointed at the same menu, provide
-   * contextual trailing by default.
+   * Overrides parent function to include legacy handling for old format of just storing a single path.
    */
-  function execute(&$vars = NULL) {
-    if (variable_get('menu_main_links_source', 'main-menu') == variable_get('menu_secondary_links_source', 'user-menu')) {
-      $vars['main_menu'] = theme_get_setting('toggle_main_menu') ? $this->menu_navigation_links(variable_get('menu_main_links_source', 'main-menu')) : $vars['main_menu'];
-      $vars['secondary_menu'] = theme_get_setting('toggle_secondary_menu') ? $this->menu_navigation_links(variable_get('menu_secondary_links_source', 'secondary-links'), 1) : $vars['secondary_menu'];
-    }
-
-    $vars['main_menu'] = $this->menu_set_active($vars['main_menu']);
-    $vars['secondary_menu'] = $this->menu_set_active($vars['secondary_menu']);
-  }
-
-  function get_active_paths() {
-    $active_paths = array();
-    foreach ($this->get_contexts() as $context) {
-      if (isset($context->reactions[$this->plugin])) {
-        $active_paths[] = $context->reactions[$this->plugin];
+  function fetch_from_context($context) {
+    $values = parent::fetch_from_context($context);
+    // Legacy - convert single string value to an array with a preferred menu
+    if (is_string($values)) {
+      $menu = menu_link_get_preferred($values);
+      if (!$menu) {
+        return array();
       }
+      return array($menu['menu_name'] . ':' . $menu['link_path']);
     }
-    return $active_paths;
+    return $values;
   }
 
   /**
-   * Iterates through a provided links array for use with theme_links()
-   * (e.g. from menu_primary_links()) and provides an active class for
-   * any items that have a path that matches an active context.
-   *
-   * @param $links
-   *   An array of links.
-   * @param $reset
-   *   A boolean flag for resetting the static cache.
-   *
-   * @return
-   *   A modified links array.
+   * Provide active trail in all menus in which our path appears.
    */
-  function menu_set_active($links = array(), $reset = FALSE) {
-    $new_links = array();
-    if (!empty($links)) {
-      $active_paths = $this->get_active_paths();
-
-      // Iterate through the provided links and build a new set of links
-      // that includes active classes
-      foreach ($links as $key => $link) {
-        if (!empty($link['href']) && in_array($link['href'], $active_paths)) {
-          $link['attributes']['class'][] = 'active';
-
-          if (strpos(' active', $key) === FALSE) {
-            $new_links[$key . ' active'] = $link;
+  function execute(&$vars = NULL) {
+    $menu_names = menu_get_active_menu_names();
+    $active_paths = $this->get_active_paths();
+    foreach ($menu_names as $menu_name) {
+      if (isset($active_paths[$menu_name])) {
+        foreach($active_paths[$menu_name] as $path) {
+          if ($link = menu_link_get_preferred($path, $menu_name)) {
+            $this->set_active_trail_from_link($link);
+            return;
           }
         }
-        else {
-          $new_links[$key] = $link;
+      }
+    }
+
+    // None of the links can be found in their preferred menus. Instead we just try to find any of the paths in any
+    // menu. Note that the preferred menu names list is still used but not always honoured.
+    // We hope to not have to fall into this section as we could end up doing rather a lot of lookups.
+    foreach ($active_paths as $menu_name => $paths) {
+      foreach($paths as $path) {
+        if ($link = menu_link_get_preferred($path)) {
+          $this->set_active_trail_from_link($link);
+          return;
         }
       }
     }
-    return $new_links;
   }
 
   /**
-   * Wrapper around menu_navigation_links() that gives themers the option of
-   * building navigation links based on an active context trail.
+   * Helper function to build and set the active trail from a menu link.
+   *
+   * @param $item
+   *   A menu link item.
    */
-  function menu_navigation_links($menu_name, $level = 0) {
-    // Retrieve original path so we can repair it after our hack.
-    $original_path = $_GET['q'];
-    $original_menu_trail = drupal_static('menu_set_active_trail');
-
-    // Retrieve the first active menu path found.
-    if ($active_paths = $this->get_active_paths()) {
-      $path = current($active_paths);
-      if (menu_get_item($path)) {
-        menu_set_active_item($path);
-      }
+  function set_active_trail_from_link($item) {
+    menu_tree_set_path($item['menu_name'], $item['link_path']);
+    $trail = array();
+    while($item) {
+      array_unshift($trail, $item);
+      $item = menu_link_load($item['plid']);
     }
+    array_unshift($trail, array(
+      'title' => t('Home'),
+      'href' => '<front>',
+      'link_path' => '',
+      'localized_options' => array(),
+      'type' => 0,
+    ));
+    menu_set_active_trail($trail);
+  }
 
-    // Build the links requested
-    if (module_exists('i18n_menu')) {
-      $links = i18n_menu_navigation_links($menu_name, $level);
-    } else {
-      $links = menu_navigation_links($menu_name, $level);
+  /**
+   * Helper function to return the list of currently active paths.
+   *
+   * The paths are grouped by menu name.
+   */
+  function get_active_paths() {
+    $active_paths = array();
+    foreach ($this->get_contexts() as $context) {
+      $paths = $this->fetch_from_context($context);
+      $active_paths = array_merge($active_paths, $paths);
     }
 
-    // Repair and get out
-    menu_set_active_item($original_path);
-    $repair_menu_trail = &drupal_static('menu_set_active_trail');
-    $repair_menu_trail = $original_menu_trail;
-    return $links;
+    $by_menu_name = array();
+    foreach ($active_paths as $id) {
+      list($menu_name, $path) = explode(':', $id);
+      $by_menu_name[$menu_name][] = $path;
+    }
+    return $by_menu_name;
   }
 }
