Index: src/wp-includes/class.wp-dependencies.php
===================================================================
--- src/wp-includes/class.wp-dependencies.php	(revision 30831)
+++ src/wp-includes/class.wp-dependencies.php	(working copy)
@@ -105,24 +105,17 @@
 				 *
 				 * Example: The extending class WP_Scripts is used to register 'scriptaculous' as a set of registered handles:
 				 *   <code>add( 'scriptaculous', false, array( 'scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls' ) );</code>
-				 *
-				 * The src property is false.
 				 */
-				if ( ! $this->registered[$handle]->src ) {
-					$this->done[] = $handle;
-					continue;
-				}
 
 				/*
-				 * Attempt to process the item. If successful,
-				 * add the handle to the done array.
-				 *
-				 * Unset the item from the to_do array.
+				 * If the src property is false,
+				 * or the item is processed successfully,
+				 * add the handle to the done array and unset the item from the to_do array.
 				 */
-				if ( $this->do_item( $handle, $group ) )
+				if ( ! $this->registered[$handle]->src || $this->do_item( $handle, $group ) ) {
 					$this->done[] = $handle;
-
-				unset( $this->to_do[$key] );
+					unset( $this->to_do[$key] );
+				}
 			}
 		}
 
@@ -400,7 +393,7 @@
 		$group = (int) $group;
 
 		if ( $recursion )
-			$group = min($this->group, $group);
+			$this->group = $group = min($this->group, $group);
 		else
 			$this->group = $group;
 
