diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 35c9e0c..caddcb3 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -2274,6 +2274,37 @@ function _drupal_exception_handler($exception) {
   }
 }
 
+function drupal_get_autoloader() {
+  // Hook up the Symfony ClassLoader for loading PSR-0-compatible classes.
+  require_once(DRUPAL_ROOT . '/core/includes/Symfony/Component/ClassLoader/UniversalClassLoader.php');
+
+  // By default, use the UniversalClassLoader which is best for development,
+  // as it does not break when code is moved on the file system. It is slow,
+  // however, so for production the APC class loader should be used instead.
+  // @todo Switch to a cleaner way to switch autoloaders than variable_get().
+  static $loader = FALSE;
+
+  if (!$loader) {
+    switch (variable_get('autoloader_mode', 'default')) {
+      case 'apc':
+        if (function_exists('apc_store')) {
+          require_once(DRUPAL_ROOT . '/core/includes/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php');
+          $loader = new \Symfony\Component\ClassLoader\ApcUniversalClassLoader('drupal.' . $GLOBALS['drupal_hash_salt']);
+          break;
+        }
+      // If APC was not loaded, fall through to the default loader so that
+      // the site does not fail completely.
+      case 'dev':
+      case 'default':
+      default:
+        $loader = new \Symfony\Component\ClassLoader\UniversalClassLoader();
+        break;
+    }
+    $loader->register();
+  }
+  return $loader;
+}
+
 /**
  * Sets up the script environment and loads settings.php.
  */
@@ -2288,39 +2319,16 @@ function _drupal_bootstrap_configuration() {
   // Initialize the configuration, including variables from settings.php.
   drupal_settings_initialize();
 
-  // Hook up the Symfony ClassLoader for loading PSR-0-compatible classes.
-  require_once(DRUPAL_ROOT . '/core/includes/Symfony/Component/ClassLoader/UniversalClassLoader.php');
-
-  // By default, use the UniversalClassLoader which is best for development,
-  // as it does not break when code is moved on the file system. It is slow,
-  // however, so for production the APC class loader should be used instead.
-  // @todo Switch to a cleaner way to switch autoloaders than variable_get().
-  switch (variable_get('autoloader_mode', 'default')) {
-    case 'apc':
-      if (function_exists('apc_store')) {
-        require_once(DRUPAL_ROOT . '/core/includes/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php');
-        $loader = new \Symfony\Component\ClassLoader\ApcUniversalClassLoader('drupal.' . $GLOBALS['drupal_hash_salt']);
-        break;
-      }
-      // If APC was not loaded, fall through to the default loader so that
-      // the site does not fail completely.
-    case 'dev':
-    case 'default':
-    default:
-      $loader = new \Symfony\Component\ClassLoader\UniversalClassLoader();
-      break;
-  }
-
+  $loader = drupal_get_autoloader();
   // Register classes with namespaces.
   $loader->registerNamespaces(array(
     // All Symfony-borrowed code lives in /core/includes/Symfony.
     'Symfony' => DRUPAL_ROOT . '/core/includes',
-    // All Drupal-namespaced code in core lives in /core/includes/Drupal.
+  ));
+  $loader->registerNamespaceFallbacks(array(
+     // All Drupal-namespaced code in core lives in /core/includes/Drupal.
     'Drupal' => DRUPAL_ROOT . '/core/includes',
   ));
-
-  // Activate the autoloader.
-  $loader->register();
 }
 
 /**
