diff --git a/core/modules/views/src/Tests/Plugin/ViewsNoResultsBehaviorTest.php b/core/modules/views/src/Tests/Plugin/ViewsNoResultsBehaviorTest.php
new file mode 100644
index 0000000000..50610f8cd5
--- /dev/null
+++ b/core/modules/views/src/Tests/Plugin/ViewsNoResultsBehaviorTest.php
@@ -0,0 +1,45 @@
+<?php
+
+namespace Drupal\views\Tests\Plugin;
+
+use Drupal\views\Tests\ViewTestBase;
+
+/**
+ * Tests no results behavior.
+ *
+ * @group views
+ */
+class ViewsNoResultsBehaviorTest extends ViewTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = ['node', 'user'];
+
+  /**
+   * Setup test.
+   */
+  protected function setUp($import_test_views = TRUE) {
+    parent::setUp();
+    $this->enableViewsTestModule();
+    $user = $this->createUser([], null, TRUE);
+    $this->drupalLogin($user);
+
+    // Set the Stark theme and use the default templates from views module.
+    /** @var \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler */
+    $theme_handler = \Drupal::service('theme_handler');
+    $theme_handler->install(['stark']);
+    $this->config('system.theme')->set('default', 'stark')->save();
+  }
+
+  /**
+   * Tests the view with the text.
+   */
+  public function testDuplicateText() {
+    $output = $this->drupalGet('admin/content');
+    $this->assertEqual(1, substr_count($output, 'No content available.'), 'Only one message should be present');
+  }
+
+}
diff --git a/core/modules/views/templates/views-view.html.twig b/core/modules/views/templates/views-view.html.twig
index e81b1ab3dd..b7f50ac35f 100644
--- a/core/modules/views/templates/views-view.html.twig
+++ b/core/modules/views/templates/views-view.html.twig
@@ -51,8 +51,12 @@
   {{ exposed }}
   {{ attachment_before }}
 
-  {{ rows }}
-  {{ empty }}
+  {% if rows %}
+    {{ rows }}
+  {% elseif empty %}
+    {{ empty }}
+  {% endif %}
+
   {{ pager }}
 
   {{ attachment_after }}
diff --git a/core/themes/stable/templates/views/views-view.html.twig b/core/themes/stable/templates/views/views-view.html.twig
index 5d372d7a92..9209b83e3e 100644
--- a/core/themes/stable/templates/views/views-view.html.twig
+++ b/core/themes/stable/templates/views/views-view.html.twig
@@ -49,8 +49,11 @@
   {{ exposed }}
   {{ attachment_before }}
 
-  {{ rows }}
-  {{ empty }}
+  {% if rows %}
+    {{ rows }}
+  {% elseif empty %}
+    {{ empty }}
+  {% endif %}
   {{ pager }}
 
   {{ attachment_after }}
