Index: menu.php
===================================================================
--- menu.php	(revision 23297)
+++ menu.php	(working copy)
@@ -156,7 +156,7 @@
 			continue;
 		}
 
-		if ( 0 === strpos($top[2], 'separator') ) { // if separator
+		if ( 0 === strpos($top[2], 'separator') && $lastorder !== false ) { // if separator
 			$first = true;
 			$c = $menu[$lastorder][4];
 			$menu[$lastorder][4] = add_cssclass('menu-top-last', $c);
