diff --git a/core/lib/Drupal/Core/Entity/EntityViewBuilder.php b/core/lib/Drupal/Core/Entity/EntityViewBuilder.php
index 8bfb3a3..070e9c6 100644
--- a/core/lib/Drupal/Core/Entity/EntityViewBuilder.php
+++ b/core/lib/Drupal/Core/Entity/EntityViewBuilder.php
@@ -148,7 +148,6 @@ protected function getBuildDefaults(EntityInterface $entity, $view_mode) {
     $this->moduleHandler()->alter('entity_view_mode', $view_mode, $entity, $context);
 
     $build = array(
-      '#theme' => $this->entityTypeId,
       "#{$this->entityTypeId}" => $entity,
       '#view_mode' => $view_mode,
       // Collect cache defaults for this entity.
@@ -159,6 +158,11 @@ protected function getBuildDefaults(EntityInterface $entity, $view_mode) {
       ),
     );
 
+    // Add the default #theme key if a template exists for it.
+    if (\Drupal::service('theme.registry')->getRuntime()->has($this->entityTypeId)) {
+      $build['#theme'] = $this->entityTypeId;
+    }
+
     // Cache the rendered output if permitted by the view mode and global entity
     // type configuration.
     if ($this->isViewModeCacheable($view_mode) && !$entity->isNew() && $entity->isDefaultRevision() && $this->entityType->isRenderCacheable()) {
diff --git a/core/modules/shortcut/tests/src/Kernel/ShortcutEntityTest.php b/core/modules/shortcut/tests/src/Kernel/ShortcutEntityTest.php
new file mode 100644
index 0000000..c2476679
--- /dev/null
+++ b/core/modules/shortcut/tests/src/Kernel/ShortcutEntityTest.php
@@ -0,0 +1,38 @@
+<?php
+
+namespace Drupal\Tests\shortcut\Kernel;
+
+use Drupal\KernelTests\KernelTestBase;
+use Drupal\shortcut\Entity\Shortcut;
+
+/**
+ * Tests shortcut entity.
+ *
+ * @group shortcut
+ */
+class ShortcutEntityTest extends KernelTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['system', 'shortcut', 'link'];
+
+  /**
+   * Tests that viewing a shortcut does not use a shortcut template.
+   */
+  public function testShortcutViewBuilder() {
+
+    $this->installConfig(['shortcut']);
+
+    $entity_type_manager = \Drupal::entityTypeManager();
+    $entity_type = $entity_type_manager->getDefinition('shortcut');
+    $this->assertTrue($entity_type->hasViewBuilderClass());
+
+    $shortcut = Shortcut::create(['shortcut_set' => 'default']);
+
+    $build = $entity_type_manager->getViewBuilder('shortcut')->view($shortcut);
+    $this->assertEquals($shortcut, $build['#shortcut']);
+    $this->assertFalse(array_key_exists('#theme', $build));
+  }
+
+}
