diff --git a/core/modules/block/custom_block/custom_block.pages.inc b/core/modules/block/custom_block/custom_block.pages.inc
index 68f3b78..e50b297 100644
--- a/core/modules/block/custom_block/custom_block.pages.inc
+++ b/core/modules/block/custom_block/custom_block.pages.inc
@@ -24,7 +24,14 @@ function template_preprocess_custom_block_add_list(&$variables) {
   $variables['types'] = array();
   foreach ($variables['content'] as $type) {
     $variables['types'][$type->id] = array();
-    $variables['types'][$type->id]['link'] = l($type->label(), 'block/add/' . $type->id());
+    $query = array();
+    if (($destination = drupal_get_destination()) && $destination['destination'] !== current_path()) {
+      // A destination parameter is set other than the current path so we
+      // respect that by adding it to the generated links. If the current path
+      // is returned, we ignore it as we don't want to end up back at block/add.
+      $query = $destination;
+    }
+    $variables['types'][$type->id]['link'] = l($type->label(), 'block/add/' . $type->id(), array('query' => $query));
     $variables['types'][$type->id]['description'] = filter_xss_admin($type->description);
   }
 }
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockTypeTest.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockTypeTest.php
index 4e8c7d6..d5322e1 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockTypeTest.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockTypeTest.php
@@ -137,4 +137,58 @@ public function testCustomBlockTypeDeletion() {
     $this->assertText(t('This action cannot be undone.'), 'The custom block type deletion confirmation form is available.');
   }
 
+  /**
+   * Tests that redirects work as expected when multiple block types exist.
+   */
+  public function testsCustomBlockAddTypes() {
+    $this->drupalLogin($this->adminUser);
+    // Create two block types programmatically.
+    $type = $this->createCustomBlockType('foo');
+    $type = $this->createCustomBlockType('bar');
+
+    // Get the default theme.
+    $theme = $this->container->get('config.factory')->get('system.theme')->get('default');
+
+    // Get the custom block storage controller.
+    $storage_controller = $this->container
+      ->get('plugin.manager.entity')
+      ->getStorageController('custom_block');
+
+    // Test that adding a block from the 'place blocks' form sends you to the
+    // block configure form.
+    $this->drupalGet('admin/structure/block/list/' . $theme . '/add');
+    $this->clickLink(t('Add custom block'));
+    $this->clickLink('foo');
+    $edit = array('info' => $this->randomName(8));
+    $this->drupalPost(NULL, $edit, t('Save'));
+    $blocks = $storage_controller->loadByProperties(array('info' => $edit['info']));
+    if (!empty($blocks)) {
+      $block = reset($blocks);
+      $destination = 'admin/structure/block/add/custom_block:' . $block->uuid() . '/' . $theme;
+      $this->assertUrl(url($destination, array('absolute' => TRUE)));
+    }
+    else {
+      $this->fail('Could not load created block.');
+    }
+
+    // Test that adding a block from the 'custom blocks list' doesn't send you
+    // to the block configure form.
+    $this->drupalGet('admin/structure/custom-blocks');
+    $this->clickLink(t('Add custom block'));
+    $this->clickLink('foo');
+    $edit = array('info' => $this->randomName(8));
+    $this->drupalPost(NULL, $edit, t('Save'));
+    $blocks = $storage_controller->loadByProperties(array('info' => $edit['info']));
+    if (!empty($blocks)) {
+      $block = reset($blocks);
+      $destination = 'admin/structure/block/add/custom_block:' . $block->uuid() . '/' . $theme;
+      $this->assertUrl(url('admin/structure/custom-blocks', array(
+        'absolute' => TRUE
+      )));
+    }
+    else {
+      $this->fail('Could not load created block.');
+    }
+  }
+
 }
