--- admin_menu.inc	Fri Jan 16 05:21:36 1970
+++ admin_menu.inc	Fri Jan 16 05:21:36 1970
@@ -5,6 +5,13 @@
  * The key function that builds the menu links whenever there is a menu rebuild.
  */
 function _admin_menu_rebuild_links() {
+  if (lock_acquire('menu_rebuild')) {
+    // Wait for another request that is already doing this work.
+    // We choose to block here since otherwise the router item may not
+    // be avaiable in menu_execute_active_handler() resulting in a 404.
+    lock_wait('menu_rebuild');
+    return FALSE;
+  }
   // Get the newly rebuilt menu.
   $menu = menu_router_build();
   // Add normal and suggested items as links.
@@ -36,6 +43,8 @@
   foreach ($links as $item) {
     admin_menu_link_save($item);
   }
+  
+  return TRUE;
 }
 
 /**
--- admin_menu.module	Fri Jan 16 05:21:36 1970
+++ admin_menu.module	Fri Jan 16 05:21:36 1970
@@ -139,8 +139,9 @@
   // Check for the flag indicating that we need to rebuild.
   if (variable_get('admin_menu_rebuild_links', FALSE)) {
     module_load_include('inc', 'admin_menu');
-    _admin_menu_rebuild_links();
-    variable_del('admin_menu_rebuild_links');
+    if (_admin_menu_rebuild_links()) {
+      variable_del('admin_menu_rebuild_links');
+    }
   }
 
   $content  = '<div id="admin-menu">';
