diff --git a/core/lib/Drupal/Core/Config/ConfigInstaller.php b/core/lib/Drupal/Core/Config/ConfigInstaller.php
index 7b938fa..fd733b8 100644
--- a/core/lib/Drupal/Core/Config/ConfigInstaller.php
+++ b/core/lib/Drupal/Core/Config/ConfigInstaller.php
@@ -466,7 +466,7 @@ public function checkConfigurationToInstall($type, $name) {
     // Check the dependencies of configuration provided by the module.
     list($invalid_default_config, $missing_dependencies) = $this->findDefaultConfigWithUnmetDependencies($storage, $enabled_extensions, $profile_storages);
     if (!empty($invalid_default_config)) {
-      throw UnmetDependenciesException::create($name, array_unique($missing_dependencies));
+      throw UnmetDependenciesException::create($name, array_unique($missing_dependencies, SORT_REGULAR));
     }
 
     // Install profiles can not have config clashes. Configuration that
diff --git a/core/modules/config/tests/config_install_double_dependency_test/config/install/config_test.dynamic.other_module_test_with_dependency.yml b/core/modules/config/tests/config_install_double_dependency_test/config/install/config_test.dynamic.other_module_test_with_dependency.yml
new file mode 100644
index 0000000..1d62266
--- /dev/null
+++ b/core/modules/config/tests/config_install_double_dependency_test/config/install/config_test.dynamic.other_module_test_with_dependency.yml
@@ -0,0 +1,13 @@
+id: other_module_test_with_dependency
+label: 'Other module test with dependency'
+weight: 0
+style: ''
+status: true
+langcode: en
+protected_property: Default
+dependencies:
+  enforced:
+    module:
+      - config_other_module_config_test
+    config:
+      - config_test.dynamic.dotted.english
diff --git a/core/modules/config/tests/config_install_double_dependency_test/config/install/config_test.dynamic.yet_another_module_test_with_dependency.yml b/core/modules/config/tests/config_install_double_dependency_test/config/install/config_test.dynamic.yet_another_module_test_with_dependency.yml
new file mode 100644
index 0000000..c59c1e5
--- /dev/null
+++ b/core/modules/config/tests/config_install_double_dependency_test/config/install/config_test.dynamic.yet_another_module_test_with_dependency.yml
@@ -0,0 +1,13 @@
+id: yet_another_module_test_with_dependency
+label: 'Yet anther module test with dependency'
+weight: 0
+style: ''
+status: true
+langcode: en
+protected_property: Default
+dependencies:
+  enforced:
+    module:
+      - config_other_module_config_test
+    config:
+      - config_test.dynamic.dotted.english
diff --git a/core/modules/config/tests/config_install_double_dependency_test/config_install_double_dependency_test.info.yml b/core/modules/config/tests/config_install_double_dependency_test/config_install_double_dependency_test.info.yml
new file mode 100644
index 0000000..99404cf
--- /dev/null
+++ b/core/modules/config/tests/config_install_double_dependency_test/config_install_double_dependency_test.info.yml
@@ -0,0 +1,5 @@
+name: 'Config install double dependency test'
+type: module
+package: Testing
+version: VERSION
+core: 8.x
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
index dcd66a3..f95207f 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
@@ -202,6 +202,15 @@ public function testDependencyChecking() {
       $this->assertEqual($e->getConfigObjects(), ['config_test.dynamic.other_module_test_with_dependency' => ['config_other_module_config_test', 'config_test.dynamic.dotted.english']]);
       $this->assertEqual($e->getMessage(), 'Configuration objects provided by <em class="placeholder">config_install_dependency_test</em> have unmet dependencies: <em class="placeholder">config_test.dynamic.other_module_test_with_dependency (config_other_module_config_test, config_test.dynamic.dotted.english)</em>');
     }
+    try {
+      $this->installModules(['config_install_double_dependency_test']);
+      $this->fail('Expected UnmetDependenciesException not thrown.');
+    }
+    catch (UnmetDependenciesException $e) {
+      $this->assertEquals($e->getExtension(), 'config_install_double_dependency_test');
+      $this->assertEquals($e->getConfigObjects(), ['config_test.dynamic.other_module_test_with_dependency' => ['config_other_module_config_test', 'config_test.dynamic.dotted.english']]);
+      $this->assertEquals($e->getMessage(), 'Configuration objects provided by <em class="placeholder">config_install_double_dependency_test</em> have unmet dependencies: <em class="placeholder">config_test.dynamic.other_module_test_with_dependency (config_other_module_config_test, config_test.dynamic.dotted.english)</em>');
+    }
     $this->installModules(['config_test_language']);
     try {
       $this->installModules(['config_install_dependency_test']);
