diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index cfc0497bbc..85c7c40746 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -1520,7 +1520,7 @@ function install_profile_modules(&$install_state) {
 
   $operations = [];
   foreach ($required + $non_required as $module => $weight) {
-    $operations[] = ['_install_module_batch', [$module, $files[$module]->info['name']]];
+    $operations[] = ['_install_module_batch', [$module, $files[$module]->info['name'], TRUE]];
   }
   $batch = [
     'operations' => $operations,
@@ -1796,8 +1796,8 @@ function install_finished(&$install_state) {
  *
  * Performs batch installation of modules.
  */
-function _install_module_batch($module, $module_name, &$context) {
-  \Drupal::service('module_installer')->install([$module], FALSE);
+function _install_module_batch($module, $module_name, $profile_installation, &$context) {
+  \Drupal::service('module_installer')->install([$module], FALSE, $profile_installation);
   $context['results'][] = $module;
   $context['message'] = t('Installed %module module.', ['%module' => $module_name]);
 }
diff --git a/core/lib/Drupal/Core/Config/ConfigInstaller.php b/core/lib/Drupal/Core/Config/ConfigInstaller.php
index b023764ebf..c0cde743d4 100644
--- a/core/lib/Drupal/Core/Config/ConfigInstaller.php
+++ b/core/lib/Drupal/Core/Config/ConfigInstaller.php
@@ -94,7 +94,7 @@ public function __construct(ConfigFactoryInterface $config_factory, StorageInter
   /**
    * {@inheritdoc}
    */
-  public function installDefaultConfig($type, $name) {
+  public function installDefaultConfig($type, $name, $profile_installation = FALSE) {
     $extension_path = $this->drupalGetPath($type, $name);
     // Refresh the schema cache if the extension provides configuration schema
     // or is a theme.
@@ -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 = $profile_installation ? [] : $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);
         }
@@ -444,7 +440,7 @@ protected function findPreExistingConfiguration(StorageInterface $storage) {
   /**
    * {@inheritdoc}
    */
-  public function checkConfigurationToInstall($type, $name) {
+  public function checkConfigurationToInstall($type, $name, $profile_installation = FALSE) {
     if ($this->isSyncing()) {
       // Configuration is assumed to already be checked by the config importer
       // validation events.
@@ -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 = $profile_installation ? [] : $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/lib/Drupal/Core/Config/ConfigInstallerInterface.php b/core/lib/Drupal/Core/Config/ConfigInstallerInterface.php
index 3d7077b53b..3c2005e603 100644
--- a/core/lib/Drupal/Core/Config/ConfigInstallerInterface.php
+++ b/core/lib/Drupal/Core/Config/ConfigInstallerInterface.php
@@ -27,10 +27,13 @@
    *   The extension type; e.g., 'module' or 'theme'.
    * @param string $name
    *   The name of the module or theme to install default configuration for.
+   * @param bool $profile_installation
+   *   (optional) Indicates whether profile installation is running. Defaults
+   *   to FALSE.
    *
    * @see \Drupal\Core\Config\ExtensionInstallStorage
    */
-  public function installDefaultConfig($type, $name);
+  public function installDefaultConfig($type, $name, $profile_installation = FALSE);
 
   /**
    * Installs optional configuration.
@@ -99,10 +102,13 @@ public function isSyncing();
    *   Type of extension to install.
    * @param string $name
    *   Name of extension to install.
+   * @param bool $profile_installation
+   *   (optional) Indicates whether profile installation is running. Defaults
+   *   to FALSE.
    *
    * @throws \Drupal\Core\Config\UnmetDependenciesException
    * @throws \Drupal\Core\Config\PreExistingConfigException
    */
-  public function checkConfigurationToInstall($type, $name);
+  public function checkConfigurationToInstall($type, $name, $profile_installation = FALSE);
 
 }
diff --git a/core/lib/Drupal/Core/Extension/ModuleInstaller.php b/core/lib/Drupal/Core/Extension/ModuleInstaller.php
index f9500a5fc7..14875639e6 100644
--- a/core/lib/Drupal/Core/Extension/ModuleInstaller.php
+++ b/core/lib/Drupal/Core/Extension/ModuleInstaller.php
@@ -74,7 +74,7 @@ public function addUninstallValidator(ModuleUninstallValidatorInterface $uninsta
   /**
    * {@inheritdoc}
    */
-  public function install(array $module_list, $enable_dependencies = TRUE) {
+  public function install(array $module_list, $enable_dependencies = TRUE, $profile_installation = FALSE) {
     $extension_config = \Drupal::configFactory()->getEditable('core.extension');
     if ($enable_dependencies) {
       // Get all module data so we can find dependencies and sort.
@@ -138,7 +138,7 @@ public function install(array $module_list, $enable_dependencies = TRUE) {
 
         // Check the validity of the default configuration. This will throw
         // exceptions if the configuration is not valid.
-        $config_installer->checkConfigurationToInstall('module', $module);
+        $config_installer->checkConfigurationToInstall('module', $module, $profile_installation);
 
         // Save this data without checking schema. This is a performance
         // improvement for module installation.
@@ -245,7 +245,7 @@ public function install(array $module_list, $enable_dependencies = TRUE) {
             ->setSyncing(TRUE)
             ->setSourceStorage($source_storage);
         }
-        \Drupal::service('config.installer')->installDefaultConfig('module', $module);
+        \Drupal::service('config.installer')->installDefaultConfig('module', $module, $profile_installation);
 
         // If the module has no current updates, but has some that were
         // previously removed, set the version to the value of
diff --git a/core/lib/Drupal/Core/Extension/ModuleInstallerInterface.php b/core/lib/Drupal/Core/Extension/ModuleInstallerInterface.php
index c8221a1722..ad072fbb68 100644
--- a/core/lib/Drupal/Core/Extension/ModuleInstallerInterface.php
+++ b/core/lib/Drupal/Core/Extension/ModuleInstallerInterface.php
@@ -30,6 +30,9 @@
    *   (optional) If TRUE, dependencies will automatically be installed in the
    *   correct order. This incurs a significant performance cost, so use FALSE
    *   if you know $module_list is already complete.
+   * @param bool $profile_installation
+   *   (optional) Indicates whether profile installation is running. Defaults
+   *   to FALSE.
    *
    * @return bool
    *   TRUE if the modules were successfully installed.
@@ -41,7 +44,7 @@
    * @see hook_install()
    * @see hook_modules_installed()
    */
-  public function install(array $module_list, $enable_dependencies = TRUE);
+  public function install(array $module_list, $enable_dependencies = TRUE, $profile_installation = FALSE);
 
   /**
    * Uninstalls a given list of modules.
diff --git a/core/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php b/core/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php
index bc7e75939d..be9a414505 100644
--- a/core/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php
+++ b/core/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php
@@ -70,9 +70,9 @@ protected function lazyLoadItself()
         /**
          * {@inheritdoc}
          */
-        public function installDefaultConfig($type, $name)
+        public function installDefaultConfig($type, $name, $profile_installation = false)
         {
-            return $this->lazyLoadItself()->installDefaultConfig($type, $name);
+            return $this->lazyLoadItself()->installDefaultConfig($type, $name, $profile_installation);
         }
 
         /**
@@ -127,9 +127,9 @@ public function isSyncing()
         /**
          * {@inheritdoc}
          */
-        public function checkConfigurationToInstall($type, $name)
+        public function checkConfigurationToInstall($type, $name, $profile_installation = false)
         {
-            return $this->lazyLoadItself()->checkConfigurationToInstall($type, $name);
+            return $this->lazyLoadItself()->checkConfigurationToInstall($type, $name, $profile_installation);
         }
 
     }
diff --git a/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php b/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php
index 174f7fb744..3a6ae40451 100644
--- a/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php
+++ b/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php
@@ -78,9 +78,9 @@ public function addUninstallValidator(\Drupal\Core\Extension\ModuleUninstallVali
         /**
          * {@inheritdoc}
          */
-        public function install(array $module_list, $enable_dependencies = true)
+        public function install(array $module_list, $enable_dependencies = true, $profile_installation = false)
         {
-            return $this->lazyLoadItself()->install($module_list, $enable_dependencies);
+            return $this->lazyLoadItself()->install($module_list, $enable_dependencies, $profile_installation);
         }
 
         /**
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
