Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.569
diff -u -p -r1.569 theme.inc
--- includes/theme.inc	13 Jan 2010 05:40:03 -0000	1.569
+++ includes/theme.inc	14 Jan 2010 18:14:19 -0000
@@ -436,6 +436,9 @@ function _theme_process_registry(&$cache
             if (function_exists($prefix . '_' . $phase . '_' . $hook)) {
               $info[$phase_key][] = $prefix . '_' . $phase . '_' . $hook;
             }
+            if (!empty($info['original hook']) && function_exists($prefix . '_' . $phase . '_' . $info['original hook'])) {
+              $info[$phase_key][] = $prefix . '_' . $phase . '_' . $info['original hook'];
+            }
           }
         }
         // Check for the override flag and prevent the cached variable
@@ -448,6 +451,9 @@ function _theme_process_registry(&$cache
         elseif (isset($cache[$hook][$phase_key]) && is_array($cache[$hook][$phase_key])) {
           $info[$phase_key] = array_merge($cache[$hook][$phase_key], $info[$phase_key]);
         }
+        elseif (isset($info['original hook']) && isset($cache[$info['original hook']][$phase_key]) && is_array($cache[$info['original hook']][$phase_key])) {
+          $info[$phase_key] = array_merge($cache[$info['original hook']][$phase_key], $info[$phase_key]);
+        }
         $result[$hook][$phase_key] = $info[$phase_key];
       }
     }
@@ -961,6 +967,7 @@ function drupal_find_theme_functions($ca
             $templates[$new_hook] = array(
               'function' => $match,
               $arg_name => $info[$arg_name],
+              'original hook' => $hook,
             );
           }
         }
@@ -1066,6 +1073,7 @@ function drupal_find_theme_templates($ca
             'template' => $file,
             'path' => dirname($files[$match]->uri),
             $arg_name => $info[$arg_name],
+            'original hook' => $hook,
           );
         }
       }
