Index: wp-includes/class.wp-scripts.php
===================================================================
--- wp-includes/class.wp-scripts.php	(revision 24556)
+++ wp-includes/class.wp-scripts.php	(working copy)
@@ -133,28 +133,38 @@
 	 * Localizes only if the script has already been added
 	 */
 	function localize( $handle, $object_name, $l10n ) {
-		if ( is_array($l10n) && isset($l10n['l10n_print_after']) ) { // back compat, preserve the code in 'l10n_print_after' if present
+		if ( is_array( $l10n ) && isset( $l10n['l10n_print_after'] ) ) { // back compat, preserve the code in 'l10n_print_after' if present
 			$after = $l10n['l10n_print_after'];
-			unset($l10n['l10n_print_after']);
+			unset( $l10n['l10n_print_after'] );
 		}
 
 		foreach ( (array) $l10n as $key => $value ) {
-			if ( !is_scalar($value) )
+			if ( ! is_scalar( $value ) )
 				continue;
 
-			$l10n[$key] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8');
+			$l10n[$key] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8' );
 		}
 
-		$script = "var $object_name = " . json_encode($l10n) . ';';
+		$script = "var $object_name = " . json_encode( $l10n ) . ';';
 
-		if ( !empty($after) )
+		if ( ! empty( $after ) )
 			$script .= "\n$after;";
 
 		$data = $this->get_data( $handle, 'data' );
 
-		if ( !empty( $data ) )
+		if ( ! empty( $data ) )
 			$script = "$data\n$script";
 
+		// For group/alias handles, add (localization) data to their first dependency
+		if ( isset( $this->registered[$handle] ) && ! $this->registered[$handle]->src && ! empty( $this->registered[$handle]->deps ) ) {
+			$first_dep = $this->registered[$handle]->deps[0];
+			// The first dependency data has priority over the handle data (printed after)
+			if ( $first_dep_data = $this->get_data( $first_dep, 'data' ) )
+				$script .= "\n$first_dep_data";
+
+			return $this->add_data( $first_dep, 'data', $script );
+		}
+
 		return $this->add_data( $handle, 'data', $script );
 	}
 
