Index: includes/menu.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/menu.inc,v
retrieving revision 1.310
diff -u -r1.310 menu.inc
--- includes/menu.inc	4 Jan 2009 20:04:32 -0000	1.310
+++ includes/menu.inc	26 Jan 2009 18:44:30 -0000
@@ -831,11 +831,16 @@
  *   A fully loaded menu link, or NULL. If a link is supplied, only the
  *   path to root will be included in the returned tree- as if this link
  *   represented the current page in a visible menu.
+ * @param $reset
+ *   Reset the static cache of the menu tree.
  * @return
  *   An tree of menu links in an array, in the order they should be rendered.
  */
-function menu_tree_all_data($menu_name = 'navigation', $item = NULL) {
+function menu_tree_all_data($menu_name = 'navigation', $item = NULL, $reset = FALSE) {
   static $tree = array();
+  if ($reset) {
+    $tree = array();
+  }
 
   // Use $mlid as a flag for whether the data being loaded is for the whole tree.
   $mlid = isset($item['mlid']) ? $item['mlid'] : 0;
@@ -1789,6 +1794,8 @@
   _menu_navigation_links_rebuild($menu);
   // Clear the page and block caches.
   _menu_clear_page_cache();
+  // Clear the menu tree cache.
+  menu_tree_all_data('navigation', NULL, TRUE);
   if (defined('MAINTENANCE_MODE')) {
     variable_set('menu_rebuild_needed', TRUE);
   }
