diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index c376882..59adb30 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -3,7 +3,7 @@
 use Drupal\Core\Database\Database;
 use Symfony\Component\ClassLoader\UniversalClassLoader;
 use Symfony\Component\ClassLoader\ApcUniversalClassLoader;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Drupal\Component\DependencyInjection\ContainerBuilder;
 
 /**
  * @file
@@ -2336,23 +2336,22 @@ function drupal_get_bootstrap_phase() {
  * @endcode
  *
  * @param $reset
- *   TRUE or FALSE depending on whether the Container instance is to be reset.
+ *   A new container instance to reset the Drupal container to.
  *
- * @return Symfony\Component\DependencyInjection\ContainerBuilder
+ * @return Drupal\Component\DependencyInjection\ContainerBuilder
  *   The instance of the Drupal Container used to set up and maintain object
  *   instances.
  */
-function drupal_container($reset = FALSE) {
+function drupal_container(ContainerBuilder $reset = NULL) {
   // We do not use drupal_static() here because we do not have a mechanism by
   // which to reinitialize the stored objects, so a drupal_static_reset() call
   // would leave Drupal in a nonfunctional state.
   static $container = NULL;
-  if ($reset || !isset($container)) {
+  if (isset($reset)) {
+    $container = $reset;
+  }
+  elseif (!isset($container)) {
     $container = new ContainerBuilder();
-    // An interface language always needs to be available for t() and other
-    // functions. This default is overridden by drupal_language_initialize()
-    // during language negotiation.
-    $container->register(LANGUAGE_TYPE_INTERFACE, 'Drupal\\Core\\Language\\Language');
   }
   return $container;
 }
diff --git a/core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php b/core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php
new file mode 100644
index 0000000..b9b3431
--- /dev/null
+++ b/core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php
@@ -0,0 +1,28 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\Core\DependencyInjection\Container.
+ */
+
+namespace Drupal\Core\DependencyInjection;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder as BaseContainerBuilder;
+
+/**
+ * Drupal's dependency injection container.
+ */
+class ContainerBuilder extends BaseContainerBuilder {
+
+  /**
+   * Registers the base Drupal services for the dependency injection container.
+   */
+  public function __construct() {
+    parent::__construct();
+
+    // An interface language always needs to be available for t() and other
+    // functions. This default is overridden by drupal_language_initialize()
+    // during language negotiation.
+    $this->register(LANGUAGE_TYPE_INTERFACE, 'Drupal\\Core\\Language\\Language');
+  }
+}
diff --git a/core/modules/language/language.test b/core/modules/language/language.test
index f0000e1..3fd9483 100644
--- a/core/modules/language/language.test
+++ b/core/modules/language/language.test
@@ -1,4 +1,5 @@
 <?php
+use Drupal\Component\DependencyInjection\ContainerBuilder;
 
 /**
  * @file
@@ -181,7 +182,7 @@ class LanguageDependencyInjectionTest extends DrupalWebTestCase {
 
     // Set up a new container to ensure we are building a new Language object
     // for each test.
-    drupal_container(TRUE);
+    drupal_container(new ContainerBuilder());
   }
 
   /**
diff --git a/core/modules/path/path.test b/core/modules/path/path.test
index a3f5820..0066071 100644
--- a/core/modules/path/path.test
+++ b/core/modules/path/path.test
@@ -542,6 +542,9 @@ class PathMonolingualTestCase extends PathTestCase {
     // Set language detection to URL.
     $edit = array('language_interface[enabled][language-url]' => TRUE);
     $this->drupalPost('admin/config/regional/language/detection', $edit, t('Save settings'));
+
+    // Force languages to be initialized.
+    drupal_language_initialize();
   }
 
   /**
diff --git a/core/modules/simpletest/drupal_web_test_case.php b/core/modules/simpletest/drupal_web_test_case.php
index 15c1656..dd7f773 100644
--- a/core/modules/simpletest/drupal_web_test_case.php
+++ b/core/modules/simpletest/drupal_web_test_case.php
@@ -1340,6 +1340,7 @@ class DrupalWebTestCase extends DrupalTestCase {
     global $user, $language_interface, $conf;
 
     // Store necessary current values before switching to prefixed database.
+    $this->originalContainer = clone drupal_container();
     $this->originalLanguage = $language_interface;
     $this->originalLanguageDefault = variable_get('language_default');
     $this->originalConfigDirectory = $GLOBALS['config_directory_name'];
@@ -1619,6 +1620,9 @@ class DrupalWebTestCase extends DrupalTestCase {
     Database::removeConnection('default');
     Database::renameConnection('simpletest_original_default', 'default');
 
+    // Restore the original dependency injection container.
+    drupal_container($this->originalContainer);
+
     // Restore original shutdown callbacks array to prevent original
     // environment of calling handlers from test run.
     $callbacks = &drupal_register_shutdown_function();
