Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.611.2.15
diff -u -p -r1.611.2.15 common.inc
--- includes/common.inc	22 Jan 2008 09:36:49 -0000	1.611.2.15
+++ includes/common.inc	22 Jan 2008 22:17:36 -0000
@@ -1636,10 +1636,12 @@ function _drupal_add_js($data, $type, $s
   if (!is_null($data)) {
     switch ($type) {
       case 'setting':
-        $javascript[$scope][$type][] = $data;
+		$hash = md5(serialize($data));
+		$javascript[$scope][$type][$hash] = $data;
         break;
       case 'inline':
-        $javascript[$scope][$type][] = array('code' => $data, 'defer' => $defer);
+        $hash = md5(serialize($data));
+        $javascript[$scope][$type][$hash] = array('code' => $data, 'defer' => $defer);
         break;
       default:
         $javascript[$scope][$type][$data] = array('cache' => $cache, 'defer' => $defer);
