diff --git a/core/modules/views/src/Plugin/views/HandlerBase.php b/core/modules/views/src/Plugin/views/HandlerBase.php
index fe06609..9ca5d56 100644
--- a/core/modules/views/src/Plugin/views/HandlerBase.php
+++ b/core/modules/views/src/Plugin/views/HandlerBase.php
@@ -703,7 +703,7 @@ public function getEntityType() {
     // If the user has configured a relationship on the handler take that into
     // account.
     if (!empty($this->options['relationship']) && $this->options['relationship'] != 'none') {
-      $views_data = $this->getViewsData()->get($this->view->relationship->table);
+      $views_data = $this->getViewsData()->get($this->view->relationship[$this->options['relationship']]->table);
     }
     else {
       $views_data = $this->getViewsData()->get($this->view->storage->get('base_table'));
diff --git a/core/modules/views/src/Plugin/views/filter/Bundle.php b/core/modules/views/src/Plugin/views/filter/Bundle.php
index 614a75c..aa77ac6 100644
--- a/core/modules/views/src/Plugin/views/filter/Bundle.php
+++ b/core/modules/views/src/Plugin/views/filter/Bundle.php
@@ -39,6 +39,9 @@ class Bundle extends InOperator {
   public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
     parent::init($view, $display, $options);
 
+    //Call initHandlers and setRelationship to ensure that the proper relationships exist for filters and arguments to anchor to.
+    $this->view->initHandlers();
+    $this->setRelationship();
     $this->entityTypeId = $this->getEntityType();
     $this->entityType = \Drupal::entityManager()->getDefinition($this->entityTypeId);
     $this->real_field = $this->entityType->getKey('bundle');
diff --git a/core/modules/views/src/Tests/Handler/RelationshipTest.php b/core/modules/views/src/Tests/Handler/RelationshipTest.php
index d361a39..cb80af6 100644
--- a/core/modules/views/src/Tests/Handler/RelationshipTest.php
+++ b/core/modules/views/src/Tests/Handler/RelationshipTest.php
@@ -24,7 +24,7 @@ class RelationshipTest extends RelationshipJoinTestBase {
    *
    * @var array
    */
-  public static $testViews = array('test_view');
+  public static $testViews = array('test_view', 'test_relationships');
 
   /**
    * Maps between the key in the expected result and the query result.
@@ -37,6 +37,23 @@ class RelationshipTest extends RelationshipJoinTestBase {
   );
 
   /**
+   * Tests the build of the view with a relationship where the base_table is not of
+   * a compatible type with the filter associated with it
+   *
+   * expectedException Exception
+   * expectedExceptionMessage Entity type validation failed because relationships haven't been properly loaded
+   */
+  public function testRelationshipBuild() {
+    $view = Views::getView('test_relationships');
+    $view->setDisplay();
+    $view->initHandlers();
+    $this->executeView($view);
+    //If an error is logged, the view couldn't be built because the filter couldn't
+    //properly map to the right relationship because they haven't been defined yet
+    //$this->assertNoErrorsLogged();
+  }
+
+  /**
    * Tests the query result of a view with a relationship.
    */
   public function testRelationshipQuery() {
diff --git a/core/modules/views/src/Tests/Plugin/RelationshipJoinTestBase.php b/core/modules/views/src/Tests/Plugin/RelationshipJoinTestBase.php
index e019168..8795e4a 100644
--- a/core/modules/views/src/Tests/Plugin/RelationshipJoinTestBase.php
+++ b/core/modules/views/src/Tests/Plugin/RelationshipJoinTestBase.php
@@ -20,7 +20,7 @@
    *
    * @var array
    */
-  public static $modules = array('system', 'user', 'entity', 'field');
+  public static $modules = array('system', 'user', 'entity', 'field', 'node');
 
   /**
    * @var \Drupal\user\Entity\User
@@ -33,6 +33,8 @@
   protected function setUpFixtures() {
     $this->installEntitySchema('user');
     $this->installConfig(array('user'));
+    $this->installEntitySchema('node');
+    $this->installConfig(array('node'));
     parent::setUpFixtures();
 
     // Create a record for uid 1.
