Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.366
diff -u -p -r1.366 theme.inc
--- includes/theme.inc	16 Aug 2007 13:59:41 -0000	1.366
+++ includes/theme.inc	16 Aug 2007 20:21:44 -0000
@@ -233,6 +233,10 @@ function _theme_process_registry(&$cache
       // conventions.
       if (!isset($info['file']) && !isset($info['function'])) {
         $result[$hook]['function'] = ($type == 'module' ? 'theme_' : $name .'_') . $hook;
+        // Check whether the default function is in an include file.
+        if (isset($info['include file'])) {
+          $info['file'] = $info['include file'];
+        }
       }
       // If a path is set in the info, use what was set. Otherwise use the
       // default path. This is mostly so system.module can declare theme
