Index: includes/module.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/module.inc,v
retrieving revision 1.176
diff -u -p -r1.176 module.inc
--- includes/module.inc	2 Dec 2009 00:17:49 -0000	1.176
+++ includes/module.inc	8 Dec 2009 23:17:26 -0000
@@ -315,13 +315,20 @@ function module_enable($module_list, $di
   }
 
   if (!empty($invoke_modules)) {
-    // Refresh the module list to exclude the disabled modules.
+    // Refresh the module list to exclude the newly-enabled modules.
     system_list_reset();
     module_list(TRUE);
     module_implements('', FALSE, TRUE);
-    // Force to regenerate the stored list of hook implementations.
+    // Rebuild the stored module and theme data, to give the newly-enabled
+    // modules a chance to change this data via hook_system_info_alter().
+    system_rebuild_module_data();
+    system_rebuild_theme_data();
+    // Force the theme registry to be rebuilt, since the newly-enabled modules
+    // might implement theme process or preprocess functions that need to run.
+    drupal_theme_rebuild();
+    // Regenerate the stored list of interfaces and classes.
     registry_rebuild();
-    // Refresh the schema to include the new enabled module.
+    // Refresh the schema to include the newly-enabled modules.
     drupal_get_schema(NULL, TRUE);
 
     // If any modules were newly installed, execute the hook for them.
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.857
diff -u -p -r1.857 system.module
--- modules/system/system.module	6 Dec 2009 01:00:27 -0000	1.857
+++ modules/system/system.module	8 Dec 2009 23:17:27 -0000
@@ -2352,6 +2352,9 @@ function system_rebuild_theme_data() {
   ksort($themes);
   system_get_files_database($themes, 'theme');
   system_update_files_database($themes, 'theme');
+  // Before returning, reset the system_list() cache, since it stores the
+  // contents of theme .info files which may now be out of date.
+  system_list_reset();
   return $themes;
 }
 
