diff --git a/core/modules/views/src/Plugin/views/HandlerBase.php b/core/modules/views/src/Plugin/views/HandlerBase.php
index 979fa4b..eead036 100644
--- a/core/modules/views/src/Plugin/views/HandlerBase.php
+++ b/core/modules/views/src/Plugin/views/HandlerBase.php
@@ -773,7 +773,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 2691541..8102367 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 65621c9..f53a88e 100644
--- a/core/modules/views/src/Tests/Handler/RelationshipTest.php
+++ b/core/modules/views/src/Tests/Handler/RelationshipTest.php
@@ -23,7 +23,8 @@ class RelationshipTest extends RelationshipJoinTestBase {
    *
    * @var array
    */
-  public static $testViews = array('test_view');
+  public static $testViews = array('test_view', 'test_relationships');
+  public static $modules = array('node','user');
 
   /**
    * Maps between the key in the expected result and the query result.
@@ -44,6 +45,23 @@ public static function getInfo() {
   }
 
   /**
+   * 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/tests/modules/views_test_config/test_views/views.view.test_relationships.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_relationships.yml
new file mode 100644
index 0000000..a837281
--- /dev/null
+++ b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_relationships.yml
@@ -0,0 +1,219 @@
+uuid: 14af4ec1-bf73-40a6-bf04-4b4e300bce3e
+langcode: en
+status: true
+dependencies:
+  module:
+    - node
+    - user
+id: test_relationships
+label: test_relationships
+module: views
+description: ''
+tag: ''
+base_table: users
+base_field: uid
+core: 8.x
+display:
+  default:
+    display_plugin: default
+    id: default
+    display_title: Master
+    position: 0
+    provider: views
+    display_options:
+      access:
+        type: perm
+        options:
+          perm: 'access content'
+        provider: user
+        dependencies: {  }
+        perm: 'access user profiles'
+      cache:
+        type: none
+        options: {  }
+        provider: views
+        dependencies: {  }
+      query:
+        type: views_query
+        options:
+          disable_sql_rewrite: false
+          distinct: false
+          replica: false
+          query_comment: false
+          query_tags: {  }
+        provider: views
+        dependencies: {  }
+      exposed_form:
+        type: basic
+        options:
+          submit_button: Apply
+          reset_button: false
+          reset_button_label: Reset
+          exposed_sorts_label: 'Sort by'
+          expose_sort_order: true
+          sort_asc_label: Asc
+          sort_desc_label: Desc
+        provider: views
+        dependencies: {  }
+      pager:
+        type: full
+        options:
+          items_per_page: 10
+          offset: 0
+          id: 0
+          total_pages: null
+          expose:
+            items_per_page: false
+            items_per_page_label: 'Items per page'
+            items_per_page_options: '5, 10, 20, 40, 60'
+            items_per_page_options_all: false
+            items_per_page_options_all_label: '- All -'
+            offset: false
+            offset_label: Offset
+          tags:
+            previous: '‹ previous'
+            next: 'next ›'
+            first: '« first'
+            last: 'last »'
+          quantity: 9
+        provider: views
+        dependencies: {  }
+      style:
+        type: default
+        options:
+          grouping: {  }
+          row_class: ''
+          default_row_class: true
+          uses_fields: false
+        provider: views
+        dependencies: {  }
+      row:
+        type: fields
+        options:
+          inline: {  }
+          separator: ''
+          hide_empty: false
+          default_field_elements: true
+        provider: views
+        dependencies: {  }
+      fields:
+        name:
+          id: name
+          table: users
+          field: name
+          provider: user
+          label: ''
+          alter:
+            alter_text: false
+            make_link: false
+            absolute: false
+            trim: false
+            word_boundary: false
+            ellipsis: false
+            strip_tags: false
+            html: false
+          hide_empty: false
+          empty_zero: false
+          link_to_user: 1
+          overwrite_anonymous: 0
+          relationship: none
+          group_type: group
+          admin_label: ''
+          dependencies: {  }
+          exclude: false
+          element_type: ''
+          element_class: ''
+          element_label_type: ''
+          element_label_class: ''
+          element_label_colon: true
+          element_wrapper_type: ''
+          element_wrapper_class: ''
+          element_default_classes: true
+          empty: ''
+          hide_alter_empty: true
+          anonymous_text: ''
+          format_username: true
+        type:
+          id: type
+          table: node_field_data
+          field: type
+          relationship: uid
+          group_type: group
+          admin_label: ''
+          dependencies:
+            module:
+              - node
+          label: Type
+          exclude: false
+          alter:
+            alter_text: false
+            text: ''
+            make_link: false
+            path: ''
+            absolute: false
+            external: false
+            replace_spaces: false
+            path_case: none
+            trim_whitespace: false
+            alt: ''
+            rel: ''
+            link_class: ''
+            prefix: ''
+            suffix: ''
+            target: ''
+            nl2br: false
+            max_length: ''
+            word_boundary: true
+            ellipsis: true
+            more_link: false
+            more_link_text: ''
+            more_link_path: ''
+            strip_tags: false
+            trim: false
+            preserve_tags: ''
+            html: false
+          element_type: ''
+          element_class: ''
+          element_label_type: ''
+          element_label_class: ''
+          element_label_colon: true
+          element_wrapper_type: ''
+          element_wrapper_class: ''
+          element_default_classes: true
+          empty: ''
+          hide_empty: false
+          empty_zero: false
+          hide_alter_empty: true
+          link_to_node: false
+          machine_name: '0'
+          plugin_id: node_type
+          provider: node
+      filters:
+        status:
+          value: true
+          table: users
+          field: status
+          provider: user
+          id: status
+          expose:
+            operator: ''
+          group: 1
+      sorts: {  }
+      header: {  }
+      footer: {  }
+      empty: {  }
+      relationships:
+        uid:
+          id: uid
+          table: users
+          field: uid
+          relationship: none
+          group_type: group
+          admin_label: nodes
+          dependencies:
+            module:
+              - views
+          required: false
+          plugin_id: standard
+          provider: views
+      arguments: {  }
