diff --git a/core/lib/Drupal/Core/Config/ConfigInstaller.php b/core/lib/Drupal/Core/Config/ConfigInstaller.php
index b023764ebf..6c5b46e7ba 100644
--- a/core/lib/Drupal/Core/Config/ConfigInstaller.php
+++ b/core/lib/Drupal/Core/Config/ConfigInstaller.php
@@ -117,19 +117,15 @@ public function installDefaultConfig($type, $name) {
         $prefix = $name . '.';
       }
 
-      // Gets profile storages to search for overrides if necessary.
-      $profile_storages = $this->getProfileStorages($name);
+      // Gets profile storages to search for overrides if necessary but only if
+      // the configuration is being installed outside of a profile/site
+      // installation.
+      $profile_storages = $this->drupalInstallationAttempted() ? [] : $this->getProfileStorages($name);
 
       // Gather information about all the supported collections.
       $collection_info = $this->configManager->getConfigCollectionInfo();
       foreach ($collection_info->getCollectionNames() as $collection) {
         $config_to_create = $this->getConfigToCreate($storage, $collection, $prefix, $profile_storages);
-        // If we're installing a profile ensure configuration that is overriding
-        // is excluded.
-        if ($name == $this->drupalGetProfile()) {
-          $existing_configuration = $this->getActiveStorages($collection)->listAll();
-          $config_to_create = array_diff_key($config_to_create, array_flip($existing_configuration));
-        }
         if (!empty($config_to_create)) {
           $this->createConfiguration($collection, $config_to_create);
         }
@@ -460,8 +456,10 @@ public function checkConfigurationToInstall($type, $name) {
     $enabled_extensions = $this->getEnabledExtensions();
     // Add the extension that will be enabled to the list of enabled extensions.
     $enabled_extensions[] = $name;
-    // Gets profile storages to search for overrides if necessary.
-    $profile_storages = $this->getProfileStorages($name);
+    // Gets profile storages to search for overrides if necessary but only if
+    // the configuration is being installed outside of a profile/site
+    // installation.
+    $profile_storages = $this->drupalInstallationAttempted() ? [] : $this->getProfileStorages($name);
 
     // Check the dependencies of configuration provided by the module.
     list($invalid_default_config, $missing_dependencies) = $this->findDefaultConfigWithUnmetDependencies($storage, $enabled_extensions, $profile_storages);
diff --git a/core/modules/system/tests/modules/testing_config_overrides_a/config/install/testing_config_overrides_a.dependencies_test.yml b/core/modules/system/tests/modules/testing_config_overrides_a/config/install/testing_config_overrides_a.dependencies_test.yml
new file mode 100644
index 0000000000..7e938e2e85
--- /dev/null
+++ b/core/modules/system/tests/modules/testing_config_overrides_a/config/install/testing_config_overrides_a.dependencies_test.yml
@@ -0,0 +1,4 @@
+test_overrides: 'testing_config_overrides_a'
+dependencies:
+  module:
+    - testing_config_overrides_a
diff --git a/core/modules/system/tests/modules/testing_config_overrides_a/config/schema/testing_config_overrides_a.schema.yml b/core/modules/system/tests/modules/testing_config_overrides_a/config/schema/testing_config_overrides_a.schema.yml
new file mode 100644
index 0000000000..01dfb3c715
--- /dev/null
+++ b/core/modules/system/tests/modules/testing_config_overrides_a/config/schema/testing_config_overrides_a.schema.yml
@@ -0,0 +1,7 @@
+testing_config_overrides_a.dependencies_test:
+  type: config_entity
+  label: 'Test profile installation overrides'
+  mapping:
+    test_overrides:
+      type: string
+      label: 'Test overrides'
diff --git a/core/modules/system/tests/modules/testing_config_overrides_a/testing_config_overrides_a.info.yml b/core/modules/system/tests/modules/testing_config_overrides_a/testing_config_overrides_a.info.yml
new file mode 100644
index 0000000000..67cea375fc
--- /dev/null
+++ b/core/modules/system/tests/modules/testing_config_overrides_a/testing_config_overrides_a.info.yml
@@ -0,0 +1,6 @@
+name: 'Config overrides test module A'
+type: module
+description: 'A testing module to be installed with the testing_config_overrides profile.'
+package: Testing
+version: VERSION
+core: 8.x
diff --git a/core/modules/system/tests/modules/testing_config_overrides_b/testing_config_overrides_b.info.yml b/core/modules/system/tests/modules/testing_config_overrides_b/testing_config_overrides_b.info.yml
new file mode 100644
index 0000000000..c398fa8787
--- /dev/null
+++ b/core/modules/system/tests/modules/testing_config_overrides_b/testing_config_overrides_b.info.yml
@@ -0,0 +1,6 @@
+name: 'Config overrides test module B'
+type: module
+description: 'A testing module to be installed with the testing_config_overrides profile.'
+package: Testing
+version: VERSION
+core: 8.x
diff --git a/core/profiles/testing_config_overrides/config/install/testing_config_overrides_a.dependencies_test.yml b/core/profiles/testing_config_overrides/config/install/testing_config_overrides_a.dependencies_test.yml
new file mode 100644
index 0000000000..1a4e67698f
--- /dev/null
+++ b/core/profiles/testing_config_overrides/config/install/testing_config_overrides_a.dependencies_test.yml
@@ -0,0 +1,5 @@
+test_overrides: 'testing_config_overrides_profile'
+dependencies:
+  module:
+    - testing_config_overrides_a
+    - testing_config_overrides_b
diff --git a/core/profiles/testing_config_overrides/testing_config_overrides.info.yml b/core/profiles/testing_config_overrides/testing_config_overrides.info.yml
index f88724c510..9627b736cc 100644
--- a/core/profiles/testing_config_overrides/testing_config_overrides.info.yml
+++ b/core/profiles/testing_config_overrides/testing_config_overrides.info.yml
@@ -8,3 +8,5 @@ dependencies:
   - action
   - language
   - tour
+  - testing_config_overrides_a
+  - testing_config_overrides_b
