diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewsTemplateTest.php b/core/modules/views/lib/Drupal/views/Tests/ViewsTemplateTest.php
new file mode 100644
index 0000000..47c1f99
--- /dev/null
+++ b/core/modules/views/lib/Drupal/views/Tests/ViewsTemplateTest.php
@@ -0,0 +1,50 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\views\Tests\ViewsTemplateTest.
+ */
+
+namespace Drupal\views\Tests;
+
+use Drupal\views\Tests\ViewTestBase;
+
+class ViewsTemplateTest extends ViewTestBase {
+
+  /**
+   * Views used by this test.
+   *
+   * @var array
+   */
+  public static $testViews = array('test_view_display_template');
+
+  public static function getInfo() {
+    return array(
+      'name' => 'View template tests',
+      'description' => 'Tests the template retrieval of views.',
+      'group' => 'Views'
+    );
+  }
+
+  protected function setUp() {
+    parent::setUp();
+
+    $this->enableViewsTestModule();
+  }
+
+
+  /**
+   * Tests render functionality.
+   */
+  public function testTemplate() {
+
+    // Make sure that the rendering just calls the preprocess function once.
+    $view = views_get_view('test_view_display_template');
+    $output = $view->preview();
+
+    // Check if we got the rendered output of our template file.
+    $this->assertTrue(strpos($output, 'This module defines its own display template.') !== FALSE, 'Display plugin DisplayTemplateTest defines its own template.');
+
+  }
+
+}
diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_view_display_template.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_view_display_template.yml
new file mode 100644
index 0000000..221ea7e
--- /dev/null
+++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_view_display_template.yml
@@ -0,0 +1,31 @@
+base_table: views_test_data
+core: '8'
+description: ''
+disabled: '0'
+display:
+  default:
+    display_options:
+      defaults:
+        fields: '0'
+        pager: '0'
+        pager_options: '0'
+        sorts: '0'
+      fields:
+        id:
+          field: id
+          id: id
+          relationship: none
+          table: views_test_data
+          plugin_id: numeric
+      pager:
+        options:
+          offset: '0'
+        type: none
+      pager_options: {  }
+    display_plugin: display_template_test
+    display_title: Master
+    id: default
+    position: '0'
+human_name: ''
+id: test_view_display_template
+tag: ''
diff --git a/core/modules/views/tests/views_test_data/lib/Drupal/views_test_data/Plugin/views/display/DisplayTemplateTest.php b/core/modules/views/tests/views_test_data/lib/Drupal/views_test_data/Plugin/views/display/DisplayTemplateTest.php
new file mode 100644
index 0000000..186c1b8
--- /dev/null
+++ b/core/modules/views/tests/views_test_data/lib/Drupal/views_test_data/Plugin/views/display/DisplayTemplateTest.php
@@ -0,0 +1,29 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\views_test_data\Plugin\views\display\DisplayTemplateTest.
+ */
+
+namespace Drupal\views_test_data\Plugin\views\display;
+
+use Drupal\Component\Annotation\Plugin;
+use Drupal\Core\Annotation\Translation;
+
+/**
+ * Defines a Display test plugin with a template inside the module folder.
+ *
+ * Whenever a module is explicitely given and the theme_path annotation is not
+ * set, views' theme implementation should look in the module's 'templates'
+ * folder.
+ *
+ * @Plugin(
+ *   id = "display_template_test",
+ *   module = "views_test_data",
+ *   title = @Translation("Display test no area"),
+ *   theme = "views_data_test_display_template",
+ *   contextual_links_locations = {"view"}
+ * )
+ */
+class DisplayTemplateTest extends DisplayTest {
+}
diff --git a/core/modules/views/tests/views_test_data/templates/views-data-test-display-template.tpl.php b/core/modules/views/tests/views_test_data/templates/views-data-test-display-template.tpl.php
new file mode 100644
index 0000000..92d83fe
--- /dev/null
+++ b/core/modules/views/tests/views_test_data/templates/views-data-test-display-template.tpl.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @file
+ * Views template test template to test the module defined templates.
+ */
+?>
+This module defines its own display template.
diff --git a/core/modules/views/views.module b/core/modules/views/views.module
index 9df2d8e..866ead6 100644
--- a/core/modules/views/views.module
+++ b/core/modules/views/views.module
@@ -134,7 +134,7 @@ function views_theme($existing, $type, $theme, $path) {
       if ($def['module'] == 'views') {
         $def['theme_file'] = 'views.theme.inc';
       }
-      elseif (isset($def['theme_file'])) {
+      elseif (isset($def['theme_file']) || (isset($def['theme']) && !isset($def['theme_path']))) {
         $def['theme_path'] = drupal_get_path('module', $def['module']);
       }
 
