diff --git a/core/lib/Drupal/Core/Config/TypedConfigManager.php b/core/lib/Drupal/Core/Config/TypedConfigManager.php
index ca0eb50..6775aab 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,11 @@ 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);
+      $extended_type = preg_replace_callback('/\*/', function() use ($wildcard_values) {
+        static $wildcard_index = 0;
+        return $wildcard_values[$wildcard_index++];
+      }, $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 +168,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 +193,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 +217,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);
       }
     }
   }
