diff --git a/src/Form/IndexAddFieldsForm.php b/src/Form/IndexAddFieldsForm.php
index 21139a7..6341587 100644
--- a/src/Form/IndexAddFieldsForm.php
+++ b/src/Form/IndexAddFieldsForm.php
@@ -363,7 +363,7 @@ protected function getPropertiesList(array $properties, $active_property_path, U
       $parent_child_type = NULL;
       if ($property instanceof ComplexDataDefinitionInterface) {
         $can_be_indexed = FALSE;
-        $nested_properties = $property->getPropertyDefinitions();
+        $nested_properties = Utility::getNestedProperties($property);
         $main_property = $property->getMainPropertyName();
         if ($main_property && isset($nested_properties[$main_property])) {
           $parent_child_type = $property->getDataType() . '.';
diff --git a/src/Item/Field.php b/src/Item/Field.php
index 98b4b63..06f3abb 100644
--- a/src/Item/Field.php
+++ b/src/Item/Field.php
@@ -3,7 +3,6 @@
 namespace Drupal\search_api\Item;
 
 use Drupal\Component\Render\FormattableMarkup;
-use Drupal\Core\TypedData\ComplexDataDefinitionInterface;
 use Drupal\search_api\Entity\Index;
 use Drupal\search_api\IndexInterface;
 use Drupal\search_api\SearchApiException;
@@ -347,7 +346,7 @@ public function setHidden($hidden = TRUE) {
   public function getDataDefinition() {
     if (!isset($this->dataDefinition)) {
       $definitions = $this->index->getPropertyDefinitions($this->getDatasourceId());
-      $definition = $this->getNestedDefinition($definitions, explode(':', $this->getPropertyPath()));
+      $definition = Utility::retrieveNestedProperty($definitions, $this->getPropertyPath());
       if (!$definition) {
         $args['%field'] = $this->getLabel();
         $args['%index'] = $this->getIndex()->label();
@@ -359,33 +358,6 @@ public function getDataDefinition() {
   }
 
   /**
-   * Retrieves a nested property definition from an array of definitions.
-   *
-   * @param \Drupal\Core\TypedData\DataDefinitionInterface[] $properties
-   *   The given array of base definitions.
-   * @param string[] $keys
-   *   An array of keys to apply to the definitions to arrive at the one that
-   *   should be returned.
-   *
-   * @return \Drupal\Core\TypedData\DataDefinitionInterface|null
-   *   The requested property definition, or NULL if it could not be found.
-   */
-  protected function getNestedDefinition(array $properties, array $keys) {
-    $key = array_shift($keys);
-    if (!isset($properties[$key])) {
-      return NULL;
-    }
-    $property = Utility::getInnerProperty($properties[$key]);
-    if (!$keys) {
-      return $property;
-    }
-    if (!$property instanceof ComplexDataDefinitionInterface) {
-      return NULL;
-    }
-    return $this->getNestedDefinition($property->getPropertyDefinitions(), $keys);
-  }
-
-  /**
    * {@inheritdoc}
    */
   public function getType() {
diff --git a/src/Plugin/search_api/datasource/ContentEntity.php b/src/Plugin/search_api/datasource/ContentEntity.php
index d3b8286..fc34a44 100644
--- a/src/Plugin/search_api/datasource/ContentEntity.php
+++ b/src/Plugin/search_api/datasource/ContentEntity.php
@@ -938,7 +938,7 @@ protected function getPropertyPathDependencies($property_path, array $properties
     }
 
     if (isset($nested_path) && $property instanceof ComplexDataDefinitionInterface) {
-      $nested_dependencies = $this->getPropertyPathDependencies($nested_path, $property->getPropertyDefinitions());
+      $nested_dependencies = $this->getPropertyPathDependencies($nested_path, Utility::getNestedProperties($property));
       foreach ($nested_dependencies as $type => $names) {
         $dependencies += array($type => array());
         $dependencies[$type] += $names;
diff --git a/src/Tests/IntegrationTest.php b/src/Tests/IntegrationTest.php
index e43e9e4..9241521 100644
--- a/src/Tests/IntegrationTest.php
+++ b/src/Tests/IntegrationTest.php
@@ -76,6 +76,7 @@ public function testFramework() {
     $this->addFieldsToIndex();
     $this->checkDataTypesTable();
     $this->removeFieldsFromIndex();
+    $this->checkReferenceFieldsNonBaseFields();
 
     $this->configureFilter();
     $this->configureFilterPage();
@@ -819,6 +820,32 @@ protected function removeFieldsFromIndex() {
   }
 
   /**
+   * Tests if non-base fields of reference fields are displayed in Add fields.
+   */
+  protected function checkReferenceFieldsNonBaseFields() {
+    // Add a entity_reference field.
+    $field_label = 'reference_field';
+    $edit = array(
+      'new_storage_type' => 'entity_reference',
+      'label' => $field_label,
+      'field_name' => '_reference_field_',
+    );
+    $this->drupalGet('admin/structure/types/manage/_content_/fields/add-field');
+    $this->assertResponse(200);
+    $this->drupalPostForm(NULL, $edit, $this->t('Save and continue'));
+    $this->drupalPostForm(NULL, ['cardinality' => -1], $this->t('Save field settings'));
+
+    $url_options['query'] = array(
+      'datasource' => 'entity:node',
+      'property_path' => 'field__reference_field_:entity',
+    );
+    $this->drupalGet($this->getIndexPath('fields/add'), $url_options);
+
+    // Check if the field is displayed to be indexed.
+    $this->assertRaw('name="entity:node/field__reference_field_:entity:field__reference_field_"');
+  }
+
+  /**
    * Tests that configuring a processor works.
    */
   protected function configureFilter() {
diff --git a/src/Utility.php b/src/Utility.php
index 79ebd21..fb56c95 100644
--- a/src/Utility.php
+++ b/src/Utility.php
@@ -5,6 +5,7 @@
 use Drupal\Component\Render\FormattableMarkup;
 use Drupal\Core\Config\ConfigImporter;
 use Drupal\Core\Entity\EntityInterface;
+use Drupal\Core\Entity\TypedData\EntityDataDefinitionInterface;
 use Drupal\Core\TypedData\ComplexDataDefinitionInterface;
 use Drupal\Core\TypedData\ComplexDataInterface;
 use Drupal\Core\TypedData\DataDefinitionInterface;
@@ -301,6 +302,33 @@ public static function extractFieldValues(TypedDataInterface $data) {
   }
 
   /**
+   * Retrieves a list of nested properties from a complex property.
+   *
+   * Takes care of including bundle-specific properties for entity reference
+   * properties.
+   *
+   * @param \Drupal\Core\TypedData\ComplexDataDefinitionInterface $property
+   *   The base definition.
+   *
+   * @return \Drupal\Core\TypedData\DataDefinitionInterface[]
+   *   The nested properties, keyed by property name.
+   */
+  public static function getNestedProperties(ComplexDataDefinitionInterface $property) {
+    $nested_properties = $property->getPropertyDefinitions();
+    if ($property instanceof EntityDataDefinitionInterface) {
+      $container = \Drupal::getContainer();
+      $bundles = $container->get('entity_type.bundle.info')
+        ->getBundleInfo($property->getEntityTypeId());
+      $field_manager = $container->get('entity_field.manager');
+      foreach ($bundles as $bundle => $bundle_label) {
+        $bundle_properties = $field_manager->getFieldDefinitions($property->getEntityTypeId(), $bundle);
+        $nested_properties += $bundle_properties;
+      }
+    }
+    return $nested_properties;
+  }
+
+  /**
    * Retrieves a nested property from a list of properties.
    *
    * @param \Drupal\Core\TypedData\DataDefinitionInterface[] $properties
@@ -317,16 +345,16 @@ public static function retrieveNestedProperty(array $properties, $property_path)
       return NULL;
     }
 
+    $property = static::getInnerProperty($properties[$key]);
     if (!isset($nested_path)) {
-      return $properties[$key];
+      return $property;
     }
 
-    $property = static::getInnerProperty($properties[$key]);
     if (!$property instanceof ComplexDataDefinitionInterface) {
       return NULL;
     }
 
-    return static::retrieveNestedProperty($property->getPropertyDefinitions(), $nested_path);
+    return static::retrieveNestedProperty(static::getNestedProperties($property), $nested_path);
   }
 
   /**
