Index: includes/menu.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/menu.inc,v
retrieving revision 1.407
diff -d -u -r1.407 menu.inc
--- includes/menu.inc	23 Aug 2010 23:38:06 -0000	1.407
+++ includes/menu.inc	28 Aug 2010 01:16:11 -0000
@@ -927,10 +927,18 @@
     if ($i == $num_items - 1) {
       $class[] = 'last';
     }
+
+    if ($data['below']) {
+      $element['#below'] = menu_tree_output($data['below']);
+    }
+    else {
+      $element['#below'] = array();
+    }
+
     // Set a class for the <li>-tag. Since $data['below'] may contain local
     // tasks, only set 'expanded' class if the link also has children within
     // the current menu.
-    if ($data['link']['has_children'] && $data['below']) {
+    if ($element['#below']) {
       $class[] = 'expanded';
     }
     elseif ($data['link']['has_children']) {
@@ -951,7 +959,6 @@
     $element['#title'] = $data['link']['title'];
     $element['#href'] = $data['link']['href'];
     $element['#localized_options'] = !empty($data['link']['localized_options']) ? $data['link']['localized_options'] : array();
-    $element['#below'] = $data['below'] ? menu_tree_output($data['below']) : $data['below'];
     $element['#original_link'] = $data['link'];
     // Index using the link's unique mlid.
     $build[$data['link']['mlid']] = $element;
