diff --git a/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php b/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php
index e245874..6e4ab6e 100644
--- a/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php
+++ b/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php
@@ -154,4 +154,5 @@ protected function getDerivativeFetcher($base_plugin_id, array $base_definition)
   public function __call($method, $args) {
     return call_user_func_array(array($this->decorated, $method), $args);
   }
+
 }
diff --git a/core/modules/block/lib/Drupal/block/Plugin/Core/Entity/Block.php b/core/modules/block/lib/Drupal/block/Plugin/Core/Entity/Block.php
index 1d3cca8..68fc56f 100644
--- a/core/modules/block/lib/Drupal/block/Plugin/Core/Entity/Block.php
+++ b/core/modules/block/lib/Drupal/block/Plugin/Core/Entity/Block.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\block\Plugin\Core\Entity;
 
+use Drupal\Component\Plugin\Exception\PluginException;
 use Drupal\Core\Config\Entity\ConfigEntityBase;
 use Drupal\Core\Entity\Annotation\EntityType;
 use Drupal\Core\Annotation\Translation;
diff --git a/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php b/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php
index 121d2de..45325c3 100644
--- a/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php
+++ b/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php
@@ -8,9 +8,16 @@
 
 namespace Drupal\block\Plugin\views\display;
 
+use Drupal\block\BlockPluginInterface;
+use Drupal\block\Plugin\Type\BlockManager;
 use Drupal\Component\Annotation\Plugin;
 use Drupal\Core\Annotation\Translation;
+use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\Query\QueryFactory;
 use Drupal\views\Plugin\views\display\DisplayPluginBase;
+use Drupal\views\ViewStorageController;
+use Drupal\views\ViewStorageInterface;
+use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
  * The plugin that handles a block.
@@ -37,6 +44,68 @@ class Block extends DisplayPluginBase {
    */
   protected $usesAttachments = TRUE;
 
+  /**
+   * The query factory.
+   *
+   * @var \Drupal\Core\Entity\Query\QueryFactory $query_factory
+   */
+  protected $queryFactory;
+
+  /**
+   * The block storage controller.
+   *
+   * @var \Drupal\Core\Entity\EntityStorageControllerInterface $block_storage_controller
+   */
+  protected $blockStorageController;
+
+  /**
+   * The block manager.
+   *
+   * @var \Drupal\block\Plugin\Type\BlockManager $block_manager
+   */
+  protected $blockManager;
+
+  /**
+   * Constructs a Block object.
+   *
+   * @param array $configuration
+   *   A configuration array containing information about the plugin instance.
+   * @param string $plugin_id
+   *   The plugin_id for the plugin instance.
+   * @param array $plugin_definition
+   *   The plugin implementation definition.
+   * @param \Drupal\Core\Entity\Query\QueryFactory $query_factory
+   *   The query factory.
+   * @param \Drupal\Core\Entity\EntityStorageControllerInterface $block_storage_controller
+   *   The block storage controller.
+   * @param \Drupal\block\Plugin\Type\BlockManager $block_manager
+   *   The block manager.
+   */
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition, QueryFactory $query_factory, EntityStorageControllerInterface $block_storage_controller, BlockManager $block_manager) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition);
+
+    $this->queryFactory = $query_factory;
+    $this->blockStorageController = $block_storage_controller;
+    $this->blockManager = $block_manager;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, array $plugin_definition) {
+    return new static(
+      $configuration,
+      $plugin_id,
+      $plugin_definition,
+      $container->get('entity.query'),
+      $container->get('plugin.manager.entity')->getStorageController('block'),
+      $container->get('plugin.manager.block')
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   */
   protected function defineOptions() {
     $options = parent::defineOptions();
 
@@ -190,10 +259,31 @@ public function usesExposed() {
   public function remove() {
     parent::remove();
 
+    $this->removeBlock();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function postDeleteView() {
+    parent::postDeleteView();
+
+    $this->removeBlock();
+  }
+
+  /**
+   * Remove all block entity instances of this display.
+   */
+  protected function removeBlock() {
     $plugin_id = 'views_block:' . $this->view->storage->id() . '-' . $this->display['id'];
-    foreach (entity_load_multiple_by_properties('block', array('plugin' => $plugin_id)) as $block) {
+    $query = $this->queryFactory->get('block');
+    $query->condition('plugin', $plugin_id);
+    $result = $query->execute();
+    $blocks = $this->blockStorageController->loadMultiple($result);
+    foreach ($blocks as $block) {
       $block->delete();
     }
+    $this->blockManager->clearCachedDefinitions();
   }
 
 }
diff --git a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php
index ec3d500..5d7dfec 100644
--- a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php
+++ b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php
@@ -29,7 +29,7 @@ class DisplayBlockTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $testViews = array('test_view_block', 'test_view_block2');
+  public static $testViews = array('test_view_block', 'test_view_block2', 'test_view_block3');
 
   public static function getInfo() {
     return array(
@@ -60,11 +60,19 @@ protected function testDeleteBlockDisplay() {
     $block_3 = $this->drupalPlaceBlock('views_block:test_view_block2-block_1', array('title' => 'test_view_block2-block_1'));
     $block_4 = $this->drupalPlaceBlock('views_block:test_view_block2-block_2', array('title' => 'test_view_block2-block_2'));
 
+
+    // Then we add one instance of blocks for each of the two displays of the
+    // third view.
+    $block_5 = $this->drupalPlaceBlock('views_block:test_view_block3-block_1', array('title' => 'test_view_block3-block_1'));
+    $block_6 = $this->drupalPlaceBlock('views_block:test_view_block3-block_2', array('title' => 'test_view_block3-block_2'));
+
     $this->drupalGet('test-page');
     $this->assertBlockAppears($block_1);
     $this->assertBlockAppears($block_2);
     $this->assertBlockAppears($block_3);
     $this->assertBlockAppears($block_4);
+    $this->assertBlockAppears($block_5);
+    $this->assertBlockAppears($block_6);
 
     $block_storage_controller = $this->container->get('plugin.manager.entity')->getStorageController('block');
 
@@ -79,11 +87,16 @@ protected function testDeleteBlockDisplay() {
     $this->assertFalse($block_storage_controller->load($block_2->id()), 'The block for this display was removed.');
     $this->assertTrue($block_storage_controller->load($block_3->id()), 'A block from another view was unaffected.');
     $this->assertTrue($block_storage_controller->load($block_4->id()), 'A block from another view was unaffected.');
+    $this->assertTrue($block_storage_controller->load($block_5->id()), 'A block from another view was unaffected.');
+    $this->assertTrue($block_storage_controller->load($block_6->id()), 'A block from another view was unaffected.');
+
     $this->drupalGet('test-page');
     $this->assertNoBlockAppears($block_1);
     $this->assertNoBlockAppears($block_2);
     $this->assertBlockAppears($block_3);
     $this->assertBlockAppears($block_4);
+    $this->assertBlockAppears($block_5);
+    $this->assertBlockAppears($block_6);
 
     // Remove the first block display of the second view and ensure the block
     // instance of the second block display still exists.
@@ -97,6 +110,18 @@ protected function testDeleteBlockDisplay() {
     $this->drupalGet('test-page');
     $this->assertNoBlockAppears($block_3);
     $this->assertBlockAppears($block_4);
+    $this->assertBlockAppears($block_5);
+    $this->assertBlockAppears($block_6);
+
+    // Remove the third view and ensure that the
+    $view = entity_load('view', 'test_view_block3');
+    $view->delete();
+
+    $this->drupalGet('test-page');
+    $this->assertNoBlockAppears($block_3);
+    $this->assertBlockAppears($block_4);
+    $this->assertNoBlockAppears($block_5);
+    $this->assertNoBlockAppears($block_6);
   }
 
   /**
@@ -158,4 +183,63 @@ public function testBlockContextualLinks() {
     $this->assertIdentical($json[$id], '<ul class="contextual-links"><li class="block-configure odd first"><a href="' . base_path() . 'admin/structure/block/manage/' . $block->id() . '?destination=test-page">Configure block</a></li><li class="views-ui-edit even last"><a href="' . base_path() . 'admin/structure/views/view/test_view_block/edit/block_1?destination=test-page">Edit view</a></li></ul>');
   }
 
+  /**
+   * Tests that deleting a view/single display refreshes the block plugins.
+   */
+  public function testBlockPluginIds() {
+    $block_manager = $this->container->get('plugin.manager.block');
+    $plugins = $block_manager->getDefinitions();
+    $this->assertTrue(isset($plugins['views_block:test_view_block-block_1']));
+    $this->assertTrue(isset($plugins['views_block:test_view_block2-block_1']));
+    $this->assertTrue(isset($plugins['views_block:test_view_block2-block_2']));
+
+    $storage_controller = $this->container->get('plugin.manager.entity')->getStorageController('view');
+    $executable_factory = $this->container->get('views.executable');
+
+    // Delete a full view and ensure none of the blocks are in there.
+    $view = $storage_controller->load('test_view_block');
+    $view->delete();
+
+    $plugins = $block_manager->getDefinitions();
+    $this->assertFalse(isset($plugins['views_block:test_view_block-block_1']));
+    $this->assertTrue(isset($plugins['views_block:test_view_block2-block_1']));
+    $this->assertTrue(isset($plugins['views_block:test_view_block2-block_2']));
+
+    // Delete a single display and ensure that this display got removed.
+    $view = $storage_controller->load('test_view_block2');
+    $executable = $executable_factory->get($view);
+    $executable->initDisplay();
+    $executable->displayHandlers->get('block_2')->remove();
+
+    $display = $view->get('display');
+    unset($display['block_2']);
+    $view->set('display', $display);
+    $view->save();
+
+    $plugins = $block_manager->getDefinitions();
+    $this->assertFalse(isset($plugins['views_block:test_view_block-block_1']));
+    $this->assertTrue(isset($plugins['views_block:test_view_block2-block_1']));
+    $this->assertFalse(isset($plugins['views_block:test_view_block2-block_2']));
+  }
+
+  /**
+   * Tests blocks act as expected when a view is disabled.
+   */
+  public function testDisableBlockPluginView() {
+    $this->drupalLogin($this->drupalCreateUser(array('administer blocks')));
+    $view = $this->container->get('plugin.manager.entity')->getStorageController('view')->load('test_view_block');
+    $this->drupalPlaceBlock("views_block:{$view->id()}-block_1", array('label' => $view->label()));
+    $this->drupalGet('/');
+    $this->assertText($view->label());
+    // Test that the page response is ok, and the block is not present.
+    $view->disable()->save();
+    $this->drupalGet('/');
+    $this->assertResponse(200);
+    $this->assertNoText($view->label());
+    // Also test the block admin page.
+    $this->drupalGet('admin/structure/block');
+    $this->assertResponse(200);
+    $this->assertNoText($view->label());
+  }
+
 }
diff --git a/core/modules/block/tests/block_test_views/test_views/views.view.test_view_block3.yml b/core/modules/block/tests/block_test_views/test_views/views.view.test_view_block3.yml
new file mode 100644
index 0000000..4f4a717
--- /dev/null
+++ b/core/modules/block/tests/block_test_views/test_views/views.view.test_view_block3.yml
@@ -0,0 +1,56 @@
+base_field: id
+base_table: views_test_data
+core: 8.x
+description: ''
+status: '1'
+display:
+  default:
+    display_plugin: default
+    id: default
+    display_title: Master
+    position: ''
+    display_options:
+      access:
+        type: perm
+      cache:
+        type: none
+      query:
+        type: views_query
+      exposed_form:
+        type: basic
+      pager:
+        type: some
+        options:
+          items_per_page: '5'
+      style:
+        type: default
+      row:
+        type: fields
+      fields:
+        name:
+          id: name
+          table: views_test_data
+          field: name
+      title: test_view_block3
+  block_1:
+    display_plugin: block
+    id: block_1
+    display_title: Block
+    position: ''
+    display_options:
+      field:
+        title:
+          link_to_node: '1'
+  block_2:
+    display_plugin: block
+    id: block_2
+    display_title: Block
+    position: ''
+    display_options:
+      field:
+        title:
+          link_to_node: '1'
+label: test_view_block3
+module: views
+id: test_view_block3
+tag: ''
diff --git a/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php b/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php
index abef195..c23306b 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php
@@ -352,9 +352,18 @@ public function postCreate(EntityStorageControllerInterface $storage_controller)
    * {@inheritdoc}
    */
   public static function postDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
+    parent::postDelete($storage_controller, $entities);
     $tempstore = \Drupal::service('user.tempstore')->get('views');
     foreach ($entities as $entity) {
+      // Delete the view from object cache.
       $tempstore->delete($entity->id());
+
+      // Allow display plugins to react on deleting the entity.
+      $executable = Views::executableFactory()->get($entity);
+      $executable->initDisplay();
+      foreach ($executable->displayHandlers as $display_handler) {
+        $display_handler->postDeleteView();
+      }
     }
   }
 
diff --git a/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsBlock.php b/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsBlock.php
index 1d243d5..8289266 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsBlock.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsBlock.php
@@ -38,6 +38,7 @@ public function getDerivativeDefinition($derivative_id, array $base_plugin_defin
    * Implements \Drupal\Component\Plugin\Derivative\DerivativeInterface::getDerivativeDefinitions().
    */
   public function getDerivativeDefinitions(array $base_plugin_definition) {
+    $this->derivatives = array();
     // Check all Views for block displays.
     foreach (views_get_all_views() as $view) {
       // Do not return results for disabled views.
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 b0cbb7b..3484195 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
@@ -2813,6 +2813,12 @@ protected function mergeHandler($type) {
     $this->setOption($types[$type]['plural'], $options);
   }
 
+  /**
+   * React on deleting the view.
+   */
+  public function postDeleteView() {
+  }
+
 }
 
 /**
diff --git a/core/modules/views/lib/Drupal/views/ViewStorageController.php b/core/modules/views/lib/Drupal/views/ViewStorageController.php
index e88cd27..29ab174 100644
--- a/core/modules/views/lib/Drupal/views/ViewStorageController.php
+++ b/core/modules/views/lib/Drupal/views/ViewStorageController.php
@@ -41,5 +41,4 @@ protected function attachLoad(&$queried_entities, $revision_id = FALSE) {
     parent::attachLoad($queried_entities, $revision_id);
   }
 
-
 }
