diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php
index bc8769ed61517a9825bc8cde7d2a87528e054121..5693a38b4f063ad55513b749b4019ded285af73c 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php
@@ -207,7 +207,7 @@ public function query() { }
    * Provide a full list of possible theme templates used by this style.
    */
   public function themeFunctions() {
-    return views_theme_functions($this->definition['theme'], $this->view, $this->view->display_handler->display);
+    return $this->view->buildThemeFunctions($this->definition['theme']);
   }
 
   /**
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
index 64b337e9507f733b49a70eb2971ecfcb20410494..b0cbb7ba24cdd71a3e0a0e2afcf5c50a1fcd1344 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
@@ -2452,7 +2452,7 @@ public function renderMoreLink() {
         if (!empty($this->view->exposed_raw_input)) {
           $url_options['query'] = $this->view->exposed_raw_input;
         }
-        $theme = views_theme_functions('views_more', $this->view, $this->view->display_handler->display);
+        $theme = $this->view->buildThemeFunctions('views_more');
         $path = check_url(url($path, $url_options));
 
         return theme($theme, array('more_url' => $path, 'link_text' => check_plain($this->useMoreText()), 'view' => $this->view));
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/pager/Full.php b/core/modules/views/lib/Drupal/views/Plugin/views/pager/Full.php
index 08a5978eed19efb711caf39ea783d59116b279ea..52adb7618212279342f7559c37f59f11a85a094b 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/pager/Full.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/pager/Full.php
@@ -81,7 +81,7 @@ public function summaryTitle() {
    * Overrides \Drupal\views\Plugin\views\pager\PagerPluginBase::render().
    */
   function render($input) {
-    $pager_theme = views_theme_functions('pager', $this->view, $this->view->display_handler->display);
+    $pager_theme = $this->view->buildThemeFunctions('pager');
     // The 0, 1, 3, 4 index are correct. See theme_pager documentation.
     $tags = array(
       0 => $this->options['tags']['first'],
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php
index a221f8fc7542d3a4d10e48ceb2e479bdc3f4beed..e271d8e86277bef2ba857db68056d7169e186b48 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php
@@ -457,7 +457,7 @@ function render() {
    */
   public function renderGroupingSets($sets, $level = 0) {
     $output = array();
-    $theme_functions = views_theme_functions($this->groupingTheme, $this->view, $this->view->display_handler->display);
+    $theme_functions = $this->view->buildThemeFunctions($this->groupingTheme);
     foreach ($sets as $set) {
       $row = reset($set['rows']);
       // Render as a grouping set.
diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php b/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php
index 37d4d8191bb1f36a9a18291604389c5f00d6da50..ee363700cd0a68f02c5924cb6934f5a3285c96da 100644
--- a/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Contains \Drupal\views\Tests\ViewExecutableTest.
+ * Contains \Drupal\views\Tests\ViewExecutableUnitTest.
  */
 
 namespace Drupal\views\Tests;
diff --git a/core/modules/views/lib/Drupal/views/ViewExecutable.php b/core/modules/views/lib/Drupal/views/ViewExecutable.php
index 25c387e46f1094eec3936fcefce2f0acd31a6539..84af7bb5a767f457198b7fa20c4bf99867628037 100644
--- a/core/modules/views/lib/Drupal/views/ViewExecutable.php
+++ b/core/modules/views/lib/Drupal/views/ViewExecutable.php
@@ -10,6 +10,7 @@
 use Drupal;
 use Symfony\Component\HttpFoundation\Response;
 use Drupal\views\ViewStorageInterface;
+use Drupal\Component\Utility\Tags;
 
 /**
  * @defgroup views_objects Objects that represent a View or part of a view
@@ -2111,4 +2112,37 @@ public function mergeDefaults() {
     }
   }
 
+  /**
+   * Provide a full array of possible theme functions to try for a given hook.
+   *
+   * @param string $hook
+   *   The hook to use. This is the base theme/template name.
+   *
+   * @return array
+   *   An array of theme hook suggestions.
+   */
+  public function buildThemeFunctions($hook) {
+    $themes = array();
+    $display = isset($this->display_handler) ? $this->display_handler->display : NULL;
+    $id = $this->storage->id();
+
+    if ($display) {
+      $themes[] = $hook . '__' . $id . '__' . $display['id'];
+      $themes[] = $hook . '__' . $display['id'];
+      // Add theme suggestions for each single tag.
+      foreach (Tags::explode($this->storage->get('tag')) as $tag) {
+        $themes[] = $hook . '__' . preg_replace('/[^a-z0-9]/', '_', strtolower($tag));
+      }
+
+      if ($display['id'] != $display['display_plugin']) {
+        $themes[] = $hook . '__' . $id . '__' . $display['display_plugin'];
+        $themes[] = $hook . '__' . $display['display_plugin'];
+      }
+    }
+    $themes[] = $hook . '__' . $id;
+    $themes[] = $hook;
+
+    return $themes;
+  }
+
 }
diff --git a/core/modules/views/tests/Drupal/views/Tests/ViewExecutableUnitTest.php b/core/modules/views/tests/Drupal/views/Tests/ViewExecutableUnitTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..5855bc43159ff717b32cea386317cca8f3cd7af0
--- /dev/null
+++ b/core/modules/views/tests/Drupal/views/Tests/ViewExecutableUnitTest.php
@@ -0,0 +1,89 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\views\Tests\ViewExecutableUnitTest.
+ */
+
+namespace Drupal\views\Tests;
+
+use Drupal\Tests\UnitTestCase;
+use Drupal\views\Plugin\Core\Entity\View;
+use Drupal\views\ViewExecutable;
+
+/**
+ * Tests methods on the ViewExecutable class.
+ *
+ * @see \Drupal\views\ViewExecutable
+ */
+class ViewExecutableUnitTest extends UnitTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'View executable test',
+      'description' => 'Tests methods on the \Drupal\views\ViewExecutable class',
+      'group' => 'Views',
+    );
+  }
+
+  /**
+   * Tests the buildThemeFunctions() method.
+   */
+  public function testBuildThemeFunctions() {
+    $config = array(
+      'id' => 'test_view',
+      'tag' => 'OnE, TWO, and three',
+      'display' => array(
+        'default' => array(
+          'id' => 'default',
+          'display_plugin' => 'default',
+          'display_title' => 'Default',
+        ),
+      ),
+    );
+
+    $storage = new View($config, 'view');
+    $view = new ViewExecutable($storage);
+
+    $expected = array(
+      'test_hook__test_view',
+      'test_hook'
+    );
+    $this->assertEquals($expected, $view->buildThemeFunctions('test_hook'));
+
+    // Add a mock display.
+    $display = $this->getMockBuilder('Drupal\views\Plugin\views\display\DisplayPluginBase')
+      ->disableOriginalConstructor()
+      ->getMock();
+    $display->display = $config['display']['default'];
+    $view->display_handler = $display;
+
+    $expected = array(
+      'test_hook__test_view__default',
+      'test_hook__default',
+      'test_hook__one',
+      'test_hook__two',
+      'test_hook__and_three',
+      'test_hook__test_view',
+      'test_hook'
+    );
+    $this->assertEquals($expected, $view->buildThemeFunctions('test_hook'));
+
+    //Change the name of the display plugin and make sure that is in the array.
+    $view->display_handler->display['display_plugin'] = 'default2';
+
+    $expected = array(
+      'test_hook__test_view__default',
+      'test_hook__default',
+      'test_hook__one',
+      'test_hook__two',
+      'test_hook__and_three',
+      'test_hook__test_view__default2',
+      'test_hook__default2',
+      'test_hook__test_view',
+      'test_hook'
+    );
+    $this->assertEquals($expected, $view->buildThemeFunctions('test_hook'));
+  }
+
+}
diff --git a/core/modules/views/views.module b/core/modules/views/views.module
index 5daa3313a44e4b479eb313b8670663ca62c2841a..d48526fa1a1d67b4655069fb82b2a1e08654b1c0 100644
--- a/core/modules/views/views.module
+++ b/core/modules/views/views.module
@@ -1360,7 +1360,7 @@ function views_exposed_form($form, &$form_state) {
   );
 
   $form['#action'] = url($view->display_handler->getUrl());
-  $form['#theme'] = views_theme_functions('views_exposed_form', $view, $display);
+  $form['#theme'] = $view->buildThemeFunctions('views_exposed_form');
   $form['#id'] = drupal_clean_css_identifier('views_exposed_form-' . check_plain($view->storage->id()) . '-' . check_plain($display['id']));
 //  $form['#attributes']['class'] = array('views-exposed-form');
 
@@ -1450,14 +1450,6 @@ function views_exposed_form_cache($views_name, $display_name, $form_output = NUL
   return empty($views_exposed[$views_name][$display_name]) ? FALSE : $views_exposed[$views_name][$display_name];
 }
 
-/**
- * Build a list of theme function names for use most everywhere.
- */
-function views_theme_functions($hook, ViewExecutable $view, $display = NULL) {
-  Drupal::moduleHandler()->loadInclude('views', 'inc', 'views.theme');
-  return _views_theme_functions($hook, $view, $display);
-}
-
 /**
  * Implements hook_query_TAG_alter().
  *
diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc
index 627e8ed7f74c1d0dc6329b248989f45e593442a6..237a91ec9a703ab6f35cde9a83367653b9615a0a 100644
--- a/core/modules/views/views.theme.inc
+++ b/core/modules/views/views.theme.inc
@@ -10,37 +10,6 @@
 use Drupal\Core\Template\Attribute;
 use Drupal\views\ViewExecutable;
 
-/**
- * Provide a full array of possible themes to try for a given hook.
- *
- * @param string $hook
- *   The hook to use. This is the base theme/template name.
- * @param \Drupal\views\ViewExecutable $view
- *   The view being rendered.
- * @param string|null $display
- *   The display being rendered, if applicable.
- */
-function _views_theme_functions($hook, ViewExecutable $view, $display = NULL) {
-  $themes = array();
-
-  if ($display) {
-    $themes[] = $hook . '__' . $view->storage->id() . '__' . $display['id'];
-    $themes[] = $hook . '__' . $display['id'];
-    // Add theme suggestions for each single tag.
-    foreach (drupal_explode_tags($view->storage->get('tag')) as $tag) {
-      $themes[] = $hook . '__' . preg_replace('/[^a-z0-9]/', '_', strtolower($tag));
-    }
-
-    if ($display['id'] != $display['display_plugin']) {
-      $themes[] = $hook . '__' . $view->storage->id() . '__' . $display['display_plugin'];
-      $themes[] = $hook . '__' . $display['display_plugin'];
-    }
-  }
-  $themes[] = $hook . '__' . $view->storage->id();
-  $themes[] = $hook;
-  return $themes;
-}
-
 /**
  * Prepares variables for view templates.
  *
@@ -1252,6 +1221,6 @@ function theme_views_mini_pager($vars) {
  * Important! When adding a new template to your theme, be sure to flush the
  * theme registry cache!
  *
- * @see _views_theme_functions()
+ * @see \Drupal\views\ViewExecutable::buildThemeFunctions()
  * @}
  */