diff --git a/core/lib/Drupal/Core/Config/ConfigManager.php b/core/lib/Drupal/Core/Config/ConfigManager.php
index e5b471d..76846b9 100644
--- a/core/lib/Drupal/Core/Config/ConfigManager.php
+++ b/core/lib/Drupal/Core/Config/ConfigManager.php
@@ -310,9 +310,12 @@ public function getConfigEntitiesToChangeOnDependencyRemoval($type, array $names
       'unchanged' => [],
     ];
 
+    dependencies_changed:
+
     // Try to fix any dependencies and find out what will happen to the
-    // dependency graph.
-    foreach ($dependents as $dependent) {
+    // dependency graph. Reverse the dependencies to start with nested
+    // dependencies first.
+    foreach (array_reverse($dependents) as $dependent) {
       /** @var \Drupal\Core\Config\Entity\ConfigEntityInterface $dependent */
       if ($dry_run) {
         // Clone the entity so any changes do not change any static caches.
@@ -324,6 +327,7 @@ public function getConfigEntitiesToChangeOnDependencyRemoval($type, array $names
         $dependency_manager->updateData($dependent->getConfigDependencyName(), $dependent->getDependencies());
         // Based on the updated data rebuild the list of dependents.
         $dependents = $this->findConfigEntityDependentsAsEntities($type, $names, $dependency_manager);
+
         // Ensure that the dependency has actually been fixed. It is possible
         // that the dependent has multiple dependencies that cause it to be in
         // the dependency chain.
@@ -337,6 +341,10 @@ public function getConfigEntitiesToChangeOnDependencyRemoval($type, array $names
         if ($fixed) {
           $return['update'][] = $dependent;
           $update_uuids[] = $dependent->uuid();
+          // If this entity was able to change itself, then others that
+          // depended on it no longer need to be removed. Restart the foreach
+          // with the remaining dependants.
+          goto dependencies_changed;
         }
       }
     }
