--- includes/menu.inc.orig	2009-02-10 03:28:21.000000000 +1100
+++ includes/menu.inc	2009-04-28 11:13:36.000000000 +1000
@@ -335,6 +335,9 @@
   if (_menu_site_is_offline()) {
     return MENU_SITE_OFFLINE;
   }
+  if ($_SERVER["REDIRECT_STATUS"] == 404) {
+   return MENU_NOT_FOUND;
+  }
   // Rebuild if we know it's needed, or if the menu masks are missing which
   // occurs rarely, likely due to a race condition of multiple rebuilds.
   if (variable_get('menu_rebuild_needed', FALSE) || !variable_get('menu_masks', array())) {
