diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index e26cb36..0dafde4 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -2644,7 +2644,7 @@ function language($type, $reset = FALSE) {
 
   // Reset the language manager's cache and our own.
   if ($reset) {
-    if (drupal_container()->has('language_manager')) {
+    if (drupal_container()->isScopeActive('request')) {
       drupal_container()->get('language_manager')->reset($type);
     }
     if (!isset($type)) {
diff --git a/core/includes/path.inc b/core/includes/path.inc
index 36556a0..07aeee5 100644
--- a/core/includes/path.inc
+++ b/core/includes/path.inc
@@ -370,7 +370,7 @@ function current_path() {
   // @todo Remove the check for whether the request service exists and the
   // fallback code below, once the path alias logic has been figured out in
   // http://drupal.org/node/1269742.
-  if (drupal_container()->has('request')) {
+  if (drupal_container()->isScopeActive('request')) {
     return drupal_container()->get('request')->attributes->get('system_path');
   }
   // If we are outside the request scope, fall back to using the path stored in
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
index bb2aef8..bbd2062 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\simpletest;
 
+use Drupal\Core\DrupalKernel;
 use Drupal\Core\Database\Database;
 use Drupal\Core\Database\ConnectionNotDefinedException;
 use PDO;
@@ -656,6 +657,12 @@ abstract class WebTestBase extends TestBase {
       module_enable(array($this->profile), FALSE);
     }
 
+    // Create a new DrupalKernel for testing purposes, now that all required
+    // modules have been enabled.
+    $kernel = new DrupalKernel('testing', FALSE);
+    $kernel->boot();
+    $this->kernel = $kernel;
+
     // Reset/rebuild all data structures after enabling the modules.
     $this->resetAll();
 
@@ -766,6 +773,10 @@ abstract class WebTestBase extends TestBase {
     if (!$this->setupDatabasePrefix) {
       return FALSE;
     }
+    // Destroy the testing kernel.
+    if (isset($this->kernel)) {
+      $this->kernel->shutdown();
+    }
     // Remove all prefixed tables.
     $connection_info = Database::getConnectionInfo('default');
     $tables = db_find_tables($connection_info['default']['prefix']['default'] . '%');
diff --git a/core/modules/system/lib/Drupal/system/Tests/Bundle/BundleTest.php b/core/modules/system/lib/Drupal/system/Tests/Bundle/BundleTest.php
index 4aeea00..3177687 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Bundle/BundleTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Bundle/BundleTest.php
@@ -33,12 +33,7 @@ class BundleTest extends WebTestBase {
    * Test that services provided by module bundles get registered to the DIC.
    */
   function testBundleRegistration() {
-    // The page callback at /bundle_test checks
-    // drupal_container()->has('bundle_test_class')
-    // and if this returns TRUE it outputs a message to this effect. We just
-    // need to check that the message appears on the page.
-    $this->drupalGet('bundle_test');
-    $this->assertText(t('The service with id bundle_test_class is available in the DIC'), t('The bundle_test_class service has been registered to the DIC'));
+    $this->assertTrue(drupal_container()->has('bundle_test_class'), t('The bundle_test_class service has been registered to the DIC'));
     // The event subscriber method in the test class calls drupal_set_message with
     // a message saying it has fired. This will fire on every page request so it
     // should show up on the front page.
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 3c434ae..c2cdcd2 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -2201,7 +2201,7 @@ function system_add_module_assets() {
  * Implements hook_custom_theme().
  */
 function system_custom_theme() {
-  if (drupal_container()->has('request')) {
+  if (drupal_container()->isScopeActive('request')) {
     $request = drupal_container()->get('request');
     $path = $request->attributes->get('system_path');
     if (user_access('view the administration theme') && path_is_admin($path)) {
diff --git a/core/modules/system/tests/modules/bundle_test/bundle_test.module b/core/modules/system/tests/modules/bundle_test/bundle_test.module
index 5f30b8f..b3d9bbc 100644
--- a/core/modules/system/tests/modules/bundle_test/bundle_test.module
+++ b/core/modules/system/tests/modules/bundle_test/bundle_test.module
@@ -1,26 +1 @@
 <?php
-
-/**
- * Implements hook_menu().
- */
-function bundle_test_menu() {
-  $items['bundle_test'] = array(
-    'type' => MENU_CALLBACK,
-    'title' => t('Bundle test callback'),
-    'page callback' => 'bundle_test_callback',
-    'access callback' => TRUE,
-  );
-  return $items;
-}
-
-/**
- * Simple callback for testing that the bundle_test_class service exists in the
- * DIC.
- */
-function bundle_test_callback() {
-  if (drupal_container()->has('bundle_test_class')) {
-    return t('The service with id bundle_test_class is available in the DIC');
-  }
-  return t('Service not found');
-}
-
