diff --git a/core/modules/system/src/Tests/Page/DefaultMetatagsTest.php b/core/modules/system/src/Tests/Page/DefaultMetatagsTest.php
index 00e09e3..5739137 100644
--- a/core/modules/system/src/Tests/Page/DefaultMetatagsTest.php
+++ b/core/modules/system/src/Tests/Page/DefaultMetatagsTest.php
@@ -29,7 +29,10 @@ public function testMetaTag() {
     $result = $this->xpath('//meta');
     $this->assertEqual((string) $result[0]->attributes()->name, 'charset');
     $this->assertEqual((string) $result[0]->attributes()->charset, 'utf-8');
+
+    // Ensure that the shortcut icon is on the page.
+    $result = $this->xpath('//link[@rel = "shortcut icon"]');
+    $this->assertEqual(count($result), 1, 'The shortcut icon is present.');
   }
 
 }
-
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 1632cb8..ba26844 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -551,7 +551,7 @@ function system_page_attachments(array &$page) {
   if (theme_get_setting('features.favicon')) {
     $favicon = theme_get_setting('favicon.url');
     $type = theme_get_setting('favicon.mimetype');
-    $element['#attached']['html_head_link'][][] = array(
+    $page['#attached']['html_head_link'][][] = array(
       'rel' => 'shortcut icon',
       'href' => UrlHelper::stripDangerousProtocols($favicon),
       'type' => $type,
