diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index f798392..4aaac1b 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -347,10 +347,6 @@ function install_begin_request(&$install_state) {
   if ($install_state['settings_verified']) {
     $kernel = new DrupalKernel('install', FALSE, drupal_classloader(), FALSE);
     $kernel->boot();
-    // Set the request in the kernel to the new created Request above
-    // so it is available to the rest of the installation process.
-    $kernel->getContainer()
-      ->set('request', $request);
   }
   else {
     // @todo Move into a proper Drupal\Core\DependencyInjection\InstallContainerBuilder.
@@ -423,6 +419,10 @@ function install_begin_request(&$install_state) {
     Drupal::setContainer($container);
   }
 
+  // Set the request in the container to the one created earlier in this
+  // function so it is available to the rest of the installation process.
+  Drupal::getContainer()->set('request', $request);
+
   // Set up $language, so t() caller functions will still work.
   drupal_language_initialize();
   // Append file translation to the translation chain.
diff --git a/core/includes/install.inc b/core/includes/install.inc
index 503b3da..7b9daca 100644
--- a/core/includes/install.inc
+++ b/core/includes/install.inc
@@ -619,10 +619,18 @@ function drupal_install_system() {
   // Create tables.
   drupal_install_schema('system');
 
-  if (!drupal_container()->has('kernel')) {
-    // Immediately boot a kernel to have real services ready.
+  if (!Drupal::getContainer()->has('kernel')) {
+    // Immediately boot a kernel to have real services ready. If there's already
+    // an initialized request object in the pre-kernel container, persist it in
+    // the post-kernel container.
+    if (Drupal::getContainer()->initialized('request')) {
+      $request = Drupal::request();
+    }
     $kernel = new DrupalKernel('install', FALSE, drupal_classloader(), FALSE);
     $kernel->boot();
+    if (isset($request)) {
+      Drupal::getContainer()->set('request', $request);
+    }
   }
 
   $system_path = drupal_get_path('module', 'system');
diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index 6d7d4fa..346722e 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -299,10 +299,16 @@ protected function getClassName() {
    */
   protected function initializeContainer() {
     $persist = $this->getServicesToPersist();
-    // If we are rebuilding the kernel and we are in a request scope, store
-    // request info so we can add them back after the rebuild.
-    if (isset($this->container) && $this->container->hasScope('request')) {
-      $request = $this->container->get('request');
+    // The request service requires custom persisting logic, since it is also
+    // potentially scoped. During Drupal installation, there is a request
+    // service without a request scope.
+    if (isset($this->container)) {
+      if ($this->container->hasScope('request') && $this->container->isScopeActive('request')) {
+        $request_scope = TRUE;
+      }
+      if ($this->container->initialized('request')) {
+        $request = $this->container->get('request');
+      }
     }
     $this->container = NULL;
     $class = $this->getClassName();
@@ -374,8 +380,10 @@ protected function initializeContainer() {
     // Set the class loader which was registered as a synthetic service.
     $this->container->set('class_loader', $this->classLoader);
     // If we have a request set it back to the new container.
-    if (isset($request)) {
+    if (!empty($request_scope)) {
       $this->container->enterScope('request');
+    }
+    if (isset($request)) {
       $this->container->set('request', $request);
     }
     \Drupal::setContainer($this->container);
