diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index 8514448..5dd1340 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -636,6 +636,9 @@ public function updateModules(array $module_list, array $module_filenames = arra
     // and container.
     if ($this->booted) {
       $this->initializeContainer(TRUE);
+      if ($this->containerNeedsDumping && !$this->dumpDrupalContainer($this->container, static::CONTAINER_BASE_CLASS)) {
+        $this->container->get('logger.factory')->get('DrupalKernel')->notice('Container cannot be written to disk');
+      }
     }
   }
 
diff --git a/core/lib/Drupal/Core/Extension/ModuleHandler.php b/core/lib/Drupal/Core/Extension/ModuleHandler.php
index f0b06dd..3583dea 100644
--- a/core/lib/Drupal/Core/Extension/ModuleHandler.php
+++ b/core/lib/Drupal/Core/Extension/ModuleHandler.php
@@ -880,6 +880,8 @@ public function install(array $module_list, $enable_dependencies = TRUE) {
       $this->invokeAll('modules_installed', array($modules_installed));
     }
 
+    \Drupal::service('router.builder')->setRebuildNeeded();
+
     return TRUE;
   }
 
