--- ./includes/menu.inc.orig	2009-07-12 07:28:31.000000000 +0200
+++ ./includes/menu.inc	2010-01-06 15:42:38.000000000 +0100
@@ -292,11 +292,16 @@
     // Get all tabs and the root page.
     $result = db_query("SELECT * FROM {menu_router} WHERE tab_root = '%s' ORDER BY weight, title", $router_item['tab_root']);
     $map = arg();
+    $mapsize = count($map);
     $children = array();
     $tasks = array();
     $root_path = $router_item['path'];
 
     while ($item = db_fetch_array($result)) {
+      while ($item['number_parts'] > $mapsize) {
+        $map[] = '%';
+        $mapsize++;
+      }
       _menu_translate($item, $map, TRUE);
       if ($item['tab_parent']) {
         // All tabs, but not the root page.
