diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 111e89a..0026cb0 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -296,12 +296,12 @@ abstract class DrupalCacheArray implements ArrayAccess {
   /**
    * A cid to pass to cache()->set() and cache()->get().
    */
-  private $cid;
+  protected $cid;
 
   /**
    * A bin to pass to cache()->set() and cache()->get().
    */
-  private $bin;
+  protected $bin;
 
   /**
    * An array of keys to add to the cache at the end of the request.
diff --git a/core/includes/common.inc b/core/includes/common.inc
index 3d19d3e..cf78fe1 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -2336,7 +2336,7 @@ function l($text, $path, array $options = array()) {
     // rendering.
     if (variable_get('theme_link', TRUE)) {
       drupal_theme_initialize();
-      $registry = theme_get_registry();
+      $registry = theme_get_registry(FALSE);
       // We don't want to duplicate functionality that's in theme(), so any
       // hint of a module or theme doing anything at all special with the 'link'
       // theme hook should simply result in theme() being called. This includes
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 94d69d2..341b1f7 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -428,6 +428,11 @@ class ThemeRegistry Extends DrupalCacheArray {
         // overwrite empty values in the current cache.
         $data = array_merge($cached->data, $data);
       }
+      else {
+        $this->completeRegistry = theme_get_registry();
+        $registry = array_fill_keys(array_keys($this->completeRegistry), NULL);
+        $data = array_merge($registry, $data);
+      }
       cache($bin)->set($cid, $data);
       if ($lock) {
         lock_release($lock_name);
