commit 6fc6bc6b8d5727d38b9fb198b6504eee5045fbfd
Author: Leandro Lucarella <llucax@gmail.com>
Date:   Sat Aug 27 21:58:18 2011 -0300

    WP: Allow menu structure without a Dashboard

diff --git a/wp-admin/includes/menu.php b/wp-admin/includes/menu.php
index fa85e4b..7fe11b0 100644
--- a/wp-admin/includes/menu.php
+++ b/wp-admin/includes/menu.php
@@ -147,12 +147,13 @@ function add_menu_classes($menu) {
 	$first = $lastorder = false;
 	$i = 0;
 	$mc = count($menu);
+	$first_order = reset(array_keys($menu));
 	foreach ( $menu as $order => $top ) {
 		$i++;
 
-		if ( 0 == $order ) { // dashboard is always shown/single
-			$menu[0][4] = add_cssclass('menu-top-first', $top[4]);
-			$lastorder = 0;
+		if ( $first_order == $order ) { // dashboard is always shown/single
+			$menu[$order][4] = add_cssclass('menu-top-first', $top[4]);
+			$lastorder = $first_order;
 			continue;
 		}
 
