diff --git a/core/lib/Drupal/Core/Entity/Controller/EntityViewController.php b/core/lib/Drupal/Core/Entity/Controller/EntityViewController.php
index 156e749..cfca858 100644
--- a/core/lib/Drupal/Core/Entity/Controller/EntityViewController.php
+++ b/core/lib/Drupal/Core/Entity/Controller/EntityViewController.php
@@ -57,6 +57,28 @@ public static function create(ContainerInterface $container) {
   }
 
   /**
+   * Build the page title.
+   */
+  public function buildTitle($page) {
+    $_entity = $page['#entity'];
+    $view_mode = $page['#view_mode'];
+
+    if ($_entity instanceof FieldableEntityInterface) {
+      $label_field = $_entity->getEntityType()->getKey('label');
+      if ($label_field && $_entity->getFieldDefinition($label_field)->getDisplayOptions('view')) {
+        // We must render the label field, because rendering the entity may be
+        // a cache hit, in which case we can't extract the rendered label field
+        // from the $page renderable array.
+        $build = $this->entityManager->getTranslationFromContext($_entity)
+          ->get($label_field)
+          ->view($view_mode);
+        $page['#title'] = $this->renderer->render($build);
+      }
+    }
+    return $page;
+  }
+
+  /**
    * Provides a page to render a single entity.
    *
    * @param \Drupal\Core\Entity\EntityInterface $_entity
@@ -78,22 +100,9 @@ public function view(EntityInterface $_entity, $view_mode = 'full', $langcode =
       ->getViewBuilder($_entity->getEntityTypeId())
       ->view($_entity, $view_mode, $langcode);
 
-    // If the entity's label is rendered using a field formatter, set the
-    // rendered title field formatter as the page title instead of the default
-    // plain text title. This allows attributes set on the field to propagate
-    // correctly (e.g. RDFa, in-place editing).
-    if ($_entity instanceof FieldableEntityInterface) {
-      $label_field = $_entity->getEntityType()->getKey('label');
-      if ($label_field && $_entity->getFieldDefinition($label_field)->getDisplayOptions('view')) {
-        // We must render the label field, because rendering the entity may be
-        // a cache hit, in which case we can't extract the rendered label field
-        // from the $page renderable array.
-        $build = $this->entityManager->getTranslationFromContext($_entity)
-          ->get($label_field)
-          ->view($view_mode);
-        $page['#title'] = $this->renderer->render($build);
-      }
-    }
+    $page['#pre_render'][] = array($this, 'buildTitle');
+    $page['#entity'] = $_entity;
+
 
     return $page;
   }
diff --git a/core/modules/node/src/Controller/NodeViewController.php b/core/modules/node/src/Controller/NodeViewController.php
index 28b8909..3e3fb65 100644
--- a/core/modules/node/src/Controller/NodeViewController.php
+++ b/core/modules/node/src/Controller/NodeViewController.php
@@ -20,10 +20,7 @@ class NodeViewController extends EntityViewController {
    * {@inheritdoc}
    */
   public function view(EntityInterface $node, $view_mode = 'full', $langcode = NULL) {
-    $build = array('nodes' => parent::view($node));
-
-    $build['#title'] = $build['nodes']['#title'];
-    unset($build['nodes']['#title']);
+    $build = parent::view($node);
 
     foreach ($node->uriRelationships() as $rel) {
       // Set the node path as the canonical URL to prevent duplicate content.
