diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index 274a3fa..6742725 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -241,6 +241,13 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface {
   protected $root;
 
   /**
+   * The state whether initializeSettings() has been called or not.
+   *
+   * @var bool
+   */
+  protected $settingsInitialized = false;
+
+  /**
    * Create a DrupalKernel object from a request.
    *
    * @param \Symfony\Component\HttpFoundation\Request $request
@@ -643,7 +650,9 @@ public function handle(Request $request, $type = self::MASTER_REQUEST, $catch =
     static::bootEnvironment();
 
     try {
-      $this->initializeSettings($request);
+      if (!$this->settingsInitialized) {
+        $this->initializeSettings($request);
+      }
 
       // Redirect the user to the installation script if Drupal has not been
       // installed yet (i.e., if no $databases array has been defined in the
@@ -1016,6 +1025,10 @@ public static function bootEnvironment($app_root = NULL) {
    *   In case the host name in the request is not trusted.
    */
   protected function initializeSettings(Request $request) {
+    if ($this->settingsInitialized) {
+      return;
+    }
+
     $site_path = static::findSitePath($request);
     $this->setSitePath($site_path);
     $class_loader_class = get_class($this->classLoader);
@@ -1054,6 +1067,8 @@ protected function initializeSettings(Request $request) {
         $this->classLoader = $loader;
       }
     }
+
+    $this->settingsInitialized = true;
   }
 
   /**
