Index: wp-includes/class.wp-styles.php
===================================================================
--- wp-includes/class.wp-styles.php	(revision 18473)
+++ wp-includes/class.wp-styles.php	(working copy)
@@ -46,12 +46,11 @@
 			$ver = $ver ? $ver . '&amp;' . $this->args[$handle] : $this->args[$handle];
 
 		if ( $this->do_concat ) {
-			if ( $this->in_default_dir($obj->src) && !isset($obj->extra['conditional'])	&& !isset($obj->extra['alt']) ) {
+			if ( $this->in_default_dir($obj->src) && !isset($obj->extra['conditional']) && !isset($obj->extra['alt']) ) {
 				$this->concat .= "$handle,";
 				$this->concat_version .= "$handle$ver";
 
-				if ( !empty($this->registered[$handle]->extra['data']) )
-					$this->print_code .= $this->registered[$handle]->extra['data'];
+				$this->print_code .= $this->get_data( $handle, 'after' );
 
 				return true;
 			}
@@ -97,21 +96,26 @@
 		return true;
 	}
 
-	function add_inline_style( $handle, $data ) {
-		if ( !$data )
+	function add_inline_style( $handle, $code ) {
+		if ( !$code )
 			return false;
 
-		if ( !empty( $this->registered[$handle]->extra['data'] ) )
-			$data .= "\n" . $this->registered[$handle]->extra['data'];
+		$after = $this->get_data( $handle, 'after' );
+		if ( !$after )
+			$after = array();
 
-		return $this->add_data( $handle, 'data', $data );
+		$after[] = $code;
+
+		return $this->add_data( $handle, 'after', $after );
 	}
 
 	function print_inline_style( $handle, $echo = true ) {
-		if ( empty($this->registered[$handle]->extra['data']) )
+		$output = $this->get_data( $handle, 'after' );
+
+		if ( empty( $output ) )
 			return false;
 
-		$output = $this->registered[$handle]->extra['data'];
+		$output = implode( "\n", $output );
 
 		if ( !$echo )
 			return $output;
@@ -151,7 +155,7 @@
 		}
 		return false;
 	}
-	
+
 	function do_footer_items() { // HTML 5 allows styles in the body, grab late enqueued items and output them in the footer.
 		$this->do_items(false, 1);
 		return $this->done;
Index: wp-includes/class.wp-dependencies.php
===================================================================
--- wp-includes/class.wp-dependencies.php	(revision 18473)
+++ wp-includes/class.wp-dependencies.php	(working copy)
@@ -134,19 +134,41 @@
 	/**
 	 * Adds extra data
 	 *
-	 * Adds data only if script has already been added
+	 * Adds data only if script has already been added.
 	 *
 	 * @param string $handle Script name
-	 * @param string $data_name Name of object in which to store extra data
-	 * @param array $data Array of extra data
+	 * @param string $key
+	 * @param mixed $value
 	 * @return bool success
 	 */
-	function add_data( $handle, $data_name, $data ) {
-		if ( !isset($this->registered[$handle]) )
+	function add_data( $handle, $key, $value ) {
+		if ( !isset( $this->registered[$handle] ) )
 			return false;
-		return $this->registered[$handle]->add_data( $data_name, $data );
+
+		return $this->registered[$handle]->add_data( $key, $value );
 	}
 
+	/**
+	 * Get extra data
+	 *
+	 * Gets data associated with a certain handle.
+	 *
+	 * @since WP 3.3
+	 *
+	 * @param string $handle Script name
+	 * @param string $key
+	 * @return mixed
+	 */
+	function get_data( $handle, $key ) {
+		if ( !isset( $this->registered[$handle] ) )
+			return false;
+
+		if ( !isset( $this->registered[$handle]->extra[$key] ) )
+			return false;
+
+		return $this->registered[$handle]->extra[$key];
+	}
+
 	function remove( $handles ) {
 		foreach ( (array) $handles as $handle )
 			unset($this->registered[$handle]);
Index: wp-includes/class.wp-scripts.php
===================================================================
--- wp-includes/class.wp-scripts.php	(revision 18473)
+++ wp-includes/class.wp-scripts.php	(working copy)
@@ -54,12 +54,8 @@
 	}
 
 	function print_script_data( $handle, $echo = true, $_l10n = false ) {
-		if ( empty($this->registered[$handle]->extra['data']) )
-			return false;
-
 		if ( $_l10n ) {
-			$name = $this->registered[$handle]->extra['l10n'][0];
-			$data = $this->registered[$handle]->extra['l10n'][1];
+			list( $name, $data ) = $this->get_data( $handle, 'l10n' );
 			$after = '';
 
 			if ( is_array($data) && isset($data['l10n_print_after']) ) {
@@ -68,7 +64,12 @@
 			}
 			$output = "var $name = " . json_encode($data) . "; $after\n";
 		} else {
-			foreach ( (array) $this->registered[$handle]->extra['data'] as $name => $data ) {
+			$data = $this->get_data( $handle, 'data' );
+
+			if ( empty( $data ) )
+				return false;
+
+			foreach ( (array) $data as $name => $data ) {
 				$output = "var $name = " . json_encode($data) . ";\n";
 			}
 		}
@@ -142,7 +143,6 @@
 	 *
 	 * Localizes only if script has already been added
 	 *
-	 * @since 
 	 * @deprecated WP 3.3
 	 */
 	function localize( $handle, $object_name, $l10n ) {
@@ -157,21 +157,24 @@
 	 *
 	 * @param string $handle Script name
 	 * @param string $name Name of JS object to hold the data
-	 * @param array $data Associative array of JS name => value
+	 * @param array $args Associative array of JS object attributes
 	 * @return bool Successful or not
 	 */
-	function add_script_data( $handle, $name, $data ) {
-		if ( !$name || !is_array($data) )
+	function add_script_data( $handle, $name, $args ) {
+		if ( !$name || !is_array( $args ) )
 			return false;
 
-		if ( !empty( $this->registered[$handle]->extra['data'][$name] ) )
-			$data = array_merge( $data, (array) $this->registered[$handle]->extra['data'][$name] );
+		$data = $this->get_data( $handle, 'data' );
 
-		return $this->add_data( $handle, 'data', array( $name => $data ) );
+		if ( !empty( $data[$name] ) )
+			$args = array_merge( $args, $data[$name] );
+
+		return $this->add_data( $handle, 'data', array( $name => $args ) );
 	}
 
 	function set_group( $handle, $recursion, $group = false ) {
-		$grp = isset($this->registered[$handle]->extra['group']) ? (int) $this->registered[$handle]->extra['group'] : 0;
+		$grp = (int) $this->get_data( $handle, 'group' );
+
 		if ( false !== $group && $grp > $group )
 			$grp = $group;
 
