diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index 5594343985cf38f537ab131eb6232ae2c4daf5f7..e6a5338df2f7d7ce7f49b6c87d6062f7e5608e9d 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -341,7 +341,7 @@ function install_begin_request(&$install_state) {
 
   // If it is not, replace the configuration storage with the InstallStorage
   // implementation, for the following reasons:
-  // - The first call into drupal_container() will try to set up the regular
+  // - The first call to $kernel->getContainer() will try to set up the regular
   //   runtime configuration storage, using the CachedStorage by default. It
   //   calls config_get_config_directory() to retrieve the config directory to
   //   use, but that throws an exception, since $config_directories is not
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index f9ae056b30b0d13f1531184e1709a38648aa1198..fac4c2150e5ed39c15a9118e8ac2a2a0acc01497 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -2146,19 +2146,6 @@ function system_page_build(&$page) {
   }
 }
 
-/**
- * Implements hook_custom_theme().
- */
-function system_custom_theme() {
-  if (drupal_container()->isScopeActive('request')) {
-    $request = \Drupal::request();
-    $path = $request->attributes->get('_system_path');
-    if (user_access('view the administration theme') && path_is_admin($path)) {
-      return \Drupal::config('system.theme')->get('admin');
-    }
-  }
-}
-
 /**
  * Implements hook_form_FORM_ID_alter().
  */