diff --git a/core/modules/system/src/Tests/Theme/RegistryTest.php b/core/modules/system/src/Tests/Theme/RegistryTest.php
index e6c80be..1fc3715 100644
--- a/core/modules/system/src/Tests/Theme/RegistryTest.php
+++ b/core/modules/system/src/Tests/Theme/RegistryTest.php
@@ -139,6 +139,7 @@ public function testSuggestionPreprocessFunctions() {
     $preprocess_functions = $registry_theme->get()['theme_test_preprocess_suggestions__kitten__bearcat']['preprocess functions'];
     $this->assertIdentical($expected_preprocess_functions, $preprocess_functions, 'Suggestion implemented as a template correctly inherits preprocess functions.');
 
+    $this->assertTrue(isset($registry_theme->get()['theme_test_preprocess_suggestions__kitten__meerkat__tarsier__moose']), 'Preprocess function with an unimplemented lower-level suggestion is added to the registry.');
   }
 
   /**
diff --git a/core/modules/system/tests/themes/test_theme/test_theme.theme b/core/modules/system/tests/themes/test_theme/test_theme.theme
index 3ce72e3..36cb4d5 100644
--- a/core/modules/system/tests/themes/test_theme/test_theme.theme
+++ b/core/modules/system/tests/themes/test_theme/test_theme.theme
@@ -142,3 +142,10 @@ function test_theme_preprocess_theme_test_preprocess_suggestions__kitten(&$varia
 function test_theme_preprocess_theme_test_preprocess_suggestions__kitten__flamingo(&$variables) {
   $variables['bar'] = 'Flamingo';
 }
+
+/**
+ * Tests a preprocess function with suggestions.
+ */
+function test_theme_preprocess_theme_test_preprocess_suggestions__kitten__meerkat__tarsier__moose(&$variables) {
+  $variables['bar'] = 'Moose';
+}
