diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index f4261e1..fee2158 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -2391,6 +2391,10 @@ function _system_rebuild_module_data() {
 
     // Invoke hook_system_info_alter() to give installed modules a chance to
     // modify the data in the .info files if necessary.
+    // system_rebuild_module_data() is often called before a full bootstrap,
+    // such as in the installer. So to allow hook_system_info_alter() to run
+    // successfully, ensure all modules are loaded before invoking the hook.
+    module_load_all();
     $type = 'module';
     drupal_alter('system_info', $modules[$key]->info, $modules[$key], $type);
   }
diff --git a/core/update.php b/core/update.php
index ac3b255..75c9d90 100644
--- a/core/update.php
+++ b/core/update.php
@@ -379,6 +379,9 @@ if (empty($op) && update_access_allowed()) {
   // in updated code are picked up.
   module_implements_reset();
 
+  // Rebuild the registry so that any classes moved by modules are rescanned.
+  registry_rebuild();
+
   // Set up $language, since the installer components require it.
   drupal_language_initialize();
 
