diff --git a/core/lib/Drupal/Core/Config/TypedConfigManager.php b/core/lib/Drupal/Core/Config/TypedConfigManager.php
index ca0eb50..e55865e 100644
--- a/core/lib/Drupal/Core/Config/TypedConfigManager.php
+++ b/core/lib/Drupal/Core/Config/TypedConfigManager.php
@@ -120,10 +120,11 @@ public function buildDataDefinition(array $definition, $value, $name = NULL, $pa
    */
   public function getDefinition($base_plugin_id, $exception_on_invalid = TRUE) {
     $definitions = $this->getDefinitions();
+    $wildcard_values = [];
     if (isset($definitions[$base_plugin_id])) {
       $type = $base_plugin_id;
     }
-    elseif (strpos($base_plugin_id, '.') && $name = $this->getFallbackName($base_plugin_id)) {
+    elseif (strpos($base_plugin_id, '.') && $name = $this->getFallbackName($base_plugin_id, $wildcard_values)) {
       // Found a generic name, replacing the last element by '*'.
       $type = $name;
     }
@@ -134,7 +135,17 @@ public function getDefinition($base_plugin_id, $exception_on_invalid = TRUE) {
     $definition = $definitions[$type];
     // Check whether this type is an extension of another one and compile it.
     if (isset($definition['type'])) {
-      $merge = $this->getDefinition($definition['type'], $exception_on_invalid);
+      // Replace the extended type's wildcards with the values of the original
+      // type's wildcards.
+      $extended_type = preg_replace_callback('/\*/', function() use ($wildcard_values) {
+        static $wildcard_index = 0;
+
+        $wildcard_value = isset($wildcard_values[$wildcard_index]) ? $wildcard_values[$wildcard_index] : '*';
+        $wildcard_index++;
+
+        return $wildcard_value;
+      }, $definition['type']);
+      $merge = $this->getDefinition($extended_type, $exception_on_invalid);
       // Preserve integer keys on merge, so sequence item types can override
       // parent settings as opposed to adding unused second, third, etc. items.
       $definition = NestedArray::mergeDeepArray(array($merge, $definition), TRUE);
@@ -163,6 +174,9 @@ public function clearCachedDefinitions() {
    *
    * @param string $name
    *   Configuration name or key.
+   * @param string[] $wildcard_values
+   *   The values of the wildcards in the configuration name. These will be
+   *   filled automatically when resolving the fallback name.
    *
    * @return null|string
    *   The resolved schema name for the given configuration name or key. Returns
@@ -185,10 +199,16 @@ public function clearCachedDefinitions() {
    *     block.*.*:*
    *     block.*
    */
-  protected function getFallbackName($name) {
+  protected function getFallbackName($name, array &$wildcard_values = []) {
     // Check for definition of $name with filesystem marker.
-    $replaced = preg_replace('/([^\.:]+)([\.:\*]*)$/', '*\2', $name);
+    $pattern = '/([^\.:]+)([\.:\*]*)$/';
+    $replaced = preg_replace($pattern, '*\2', $name);
     if ($replaced != $name) {
+      // Keep track of wildcard values.
+      $matches = [];
+      preg_match($pattern, $name, $matches);
+      array_unshift($wildcard_values, $matches[1]);
+
       if (isset($this->definitions[$replaced])) {
         return $replaced;
       }
@@ -203,7 +223,7 @@ protected function getFallbackName($name) {
         }
         // Check for next level. For example, if breakpoint.breakpoint.* has
         // been checked and no match found then check breakpoint.*.*
-        return $this->getFallbackName($replaced);
+        return $this->getFallbackName($replaced, $wildcard_values);
       }
     }
   }
diff --git a/core/tests/Drupal/Tests/Core/Config/TypedConfigManagerTest.php b/core/tests/Drupal/Tests/Core/Config/TypedConfigManagerTest.php
new file mode 100644
index 0000000..dc1dafe
--- /dev/null
+++ b/core/tests/Drupal/Tests/Core/Config/TypedConfigManagerTest.php
@@ -0,0 +1,156 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Tests\Core\Config\TypedConfigManagerTest.
+ */
+
+namespace Drupal\Tests\Core\Config;
+
+use Drupal\Core\Cache\CacheBackendInterface;
+use Drupal\Core\Config\StorageInterface;
+use Drupal\Core\Config\TypedConfigManager;
+use Drupal\Core\Extension\ModuleHandlerInterface;
+use Drupal\Core\TypedData\DataDefinition;
+use Drupal\Tests\UnitTestCase;
+
+
+/**
+ * @coversDefaultClass \Drupal\Core\Config\TypedConfigManager
+ *
+ * @group Config
+ */
+class TypedConfigManagerTest extends UnitTestCase {
+
+  /**
+   * The cache backend.
+   *
+   * @var \Drupal\Core\Cache\CacheBackendInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $cacheBackend;
+
+  /**
+   * The configuration storage.
+   *
+   * @var \Drupal\Core\Config\StorageInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $configStorage;
+
+  /**
+   * The module handler.
+   *
+   * @var \Drupal\Core\Extension\ModuleHandlerInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $moduleHandler;
+
+  /**
+   * The configuration schema storage.
+   *
+   * @var \Drupal\Core\Config\StorageInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $schemaStorage;
+
+  /**
+   * The subject under test.
+   *
+   * @var \Drupal\Core\Config\TypedConfigManager
+   */
+  protected $sut;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setUp() {
+    $this->cacheBackend = $this->getMock(CacheBackendInterface::class);
+    $this->configStorage = $this->getMock(StorageInterface::class);
+    $this->moduleHandler = $this->getMock(ModuleHandlerInterface::class);
+    $this->schemaStorage = $this->getMock(StorageInterface::class);
+
+    $this->sut = new TypedConfigManager($this->configStorage, $this->schemaStorage, $this->cacheBackend, $this->moduleHandler);
+  }
+
+  /**
+   * @covers ::getDefinition
+   * @covers ::getFallbackName
+   *
+   * @dataProvider providerGetDefinition
+   *
+   * @param mixed[] $expected_definition
+   *   The expected schema definition.
+   * @param string $schema_id
+   *   The ID of the expected schema.
+   * @param array[] $schema_definitions
+   *   All available schema definitions.
+   */
+  public function testGetDefinition(array $expected_definition, $schema_id, array $schema_definitions) {
+    $this->schemaStorage->expects($this->atLeastOnce())
+      ->method('listAll')
+      ->willReturn([]);
+    $this->schemaStorage->expects($this->atLeastOnce())
+      ->method('readMultiple')
+      ->willReturn([$schema_definitions]);
+
+    $this->assertSame($expected_definition, $this->sut->getDefinition($schema_id));
+  }
+
+  /**
+   * Provides data to self::testGetDefinition().
+   */
+  public function providerGetDefinition() {
+    $undefined_schema_definition = [
+      'definition_class' => DataDefinition::class,
+      'check' => 'Undefined',
+    ];
+    $simple_schema_definition = [
+      'definition_class' => DataDefinition::class,
+      'check' => 'Simple',
+    ];
+    $fallback_schema_definition = [
+      'definition_class' => DataDefinition::class,
+      'check' => 'Fallback',
+    ];
+    $fallback_resolved_schema_definition = [
+      'definition_class' => DataDefinition::class,
+      'check' => 'FallbackResolved',
+    ];
+    $fallback_alias_schema_definition = [
+      'type' => 'fallback.*',
+      // We do not need a check item, because this is an alias.
+    ];
+    $schema_definitions = [
+      'simple' => $simple_schema_definition,
+      'undefined' => $undefined_schema_definition,
+      'fallback.*' => $fallback_schema_definition,
+      'fallback.resolved' => $fallback_resolved_schema_definition,
+      'fallback_alias.*' => $fallback_alias_schema_definition,
+    ];
+
+    return [
+      // A non-existent schema ID.
+      [$undefined_schema_definition + [
+          'type' => 'undefined',
+        ], 'non_existent', $schema_definitions],
+      // A schema with an ID without wildcards.
+      [$simple_schema_definition + [
+          'type' => 'simple',
+        ], 'simple', $schema_definitions],
+      // A non-existent schema ID for which a direct fallback exists.
+      [$fallback_schema_definition + [
+          'type' => 'fallback.*',
+        ], 'fallback.non_existent', $schema_definitions],
+      // A schema ID for which a direct, unused fallback exists.
+      [$fallback_resolved_schema_definition + [
+          'type' => 'fallback.resolved',
+        ], 'fallback.resolved', $schema_definitions],
+      // An aliased schema ID.
+      [$fallback_schema_definition + [
+          'type' => 'fallback_alias.*',
+        ], 'fallback_alias.*', $schema_definitions],
+      // An aliased schema ID with a resolved wildcard.
+      [$fallback_resolved_schema_definition + [
+          'type' => 'fallback_alias.*',
+        ], 'fallback_alias.resolved', $schema_definitions],
+    ];
+  }
+
+}
