diff --git a/core/includes/module.inc b/core/includes/module.inc
index 60c4035..0a915c2 100644
--- a/core/includes/module.inc
+++ b/core/includes/module.inc
@@ -176,7 +176,6 @@ function system_list($type) {
         }
         // Build a list of filenames so drupal_get_filename can use it.
         if ($record->status) {
-          drupal_classloader_register($record->name, dirname($record->filename));
           $lists['filepaths'][] = array('type' => $record->type, 'name' => $record->name, 'filepath' => $record->filename);
         }
       }
@@ -210,6 +209,7 @@ function system_list($type) {
     // drupal_get_filename() static cache with all enabled modules and themes.
     foreach ($lists['filepaths'] as $item) {
       drupal_get_filename($item['type'], $item['name'], $item['filepath']);
+      drupal_classloader_register($item['name'], dirname($record->filename));
     }
   }
 
diff --git a/core/includes/registry.inc b/core/includes/registry.inc
index 7ac2960..0be69ff 100644
--- a/core/includes/registry.inc
+++ b/core/includes/registry.inc
@@ -47,9 +47,6 @@ function _registry_update() {
       }
     }
   }
-  foreach (file_scan_directory('core/includes', '/\.inc$/') as $filename => $file) {
-    $files["$filename"] = array('module' => '', 'weight' => 0);
-  }
 
   $transaction = db_transaction();
   try {
