Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.621
diff -u -r1.621 theme.inc
--- includes/theme.inc	28 Oct 2010 02:27:08 -0000	1.621
+++ includes/theme.inc	28 Oct 2010 20:01:31 -0000
@@ -372,6 +372,13 @@
     'process functions'    => 'process',
   );
 
+  $key_overrides = array(
+    'variables'      => TRUE,
+    'render element' => TRUE,
+    'pattern'        => TRUE,
+    'base hook'      => TRUE,
+  );
+
   if (function_exists($function)) {
     $result = $function($cache, $type, $theme, $path);
     foreach ($result as $hook => $info) {
@@ -401,10 +408,8 @@
       // by hook_theme(), carry them forward from the prior entry. This is so
       // that themes don't need to specify this information, since the module
       // that registered the theme hook already has.
-      foreach (array('variables', 'render element', 'pattern', 'base hook') as $key) {
-        if (!isset($info[$key]) && isset($cache[$hook][$key])) {
-          $result[$hook][$key] = $cache[$hook][$key];
-        }
+      if (isset($cache[$hook])) {
+        $result[$hook] += array_intersect_key($cache[$hook], $key_overrides);
       }
 
       // The following apply only to theming hooks implemented as templates.
