diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockLanguageTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockLanguageTest.php
index 2e4a4c6..caec92f 100644
--- a/core/modules/block/lib/Drupal/block/Tests/BlockLanguageTest.php
+++ b/core/modules/block/lib/Drupal/block/Tests/BlockLanguageTest.php
@@ -53,6 +53,7 @@ function setUp() {
    * Tests the visibility settings for the blocks based on language.
    */
   public function testLanguageBlockVisibility() {
+    $this->rebuildContainer();
     // Check if the visibility setting is available.
     $default_theme = \Drupal::config('system.theme')->get('default');
     $this->drupalGet('admin/structure/block/add/system_powered_by_block' . '/' . $default_theme);
diff --git a/core/modules/editor/lib/Drupal/editor/Tests/EditorAdminTest.php b/core/modules/editor/lib/Drupal/editor/Tests/EditorAdminTest.php
index 177e050..221d04c 100644
--- a/core/modules/editor/lib/Drupal/editor/Tests/EditorAdminTest.php
+++ b/core/modules/editor/lib/Drupal/editor/Tests/EditorAdminTest.php
@@ -105,7 +105,6 @@ public function testAddEditorToNewFormat() {
    */
   protected function enableUnicornEditor() {
     \Drupal::moduleHandler()->install(array('editor_test'));
-    $this->rebuildContainer();
     $this->resetAll();
   }
 
diff --git a/core/modules/language/lib/Drupal/language/Tests/LanguageConfigurationTest.php b/core/modules/language/lib/Drupal/language/Tests/LanguageConfigurationTest.php
index 1fb8c85..95ca62d 100644
--- a/core/modules/language/lib/Drupal/language/Tests/LanguageConfigurationTest.php
+++ b/core/modules/language/lib/Drupal/language/Tests/LanguageConfigurationTest.php
@@ -71,6 +71,7 @@ function testLanguageConfiguration() {
       'site_default_language' => 'fr',
     );
     $this->drupalPostForm(NULL, $edit, t('Save configuration'));
+    $this->rebuildContainer();
     $this->assertOptionSelected('edit-site-default-language', 'fr', 'Default language updated.');
     $this->assertEqual($this->getUrl(), url('admin/config/regional/settings', array('absolute' => TRUE)), 'Correct page redirection.');
 
diff --git a/core/modules/language/lib/Drupal/language/Tests/LanguageListTest.php b/core/modules/language/lib/Drupal/language/Tests/LanguageListTest.php
index 8b2190d..a5b8ac9 100644
--- a/core/modules/language/lib/Drupal/language/Tests/LanguageListTest.php
+++ b/core/modules/language/lib/Drupal/language/Tests/LanguageListTest.php
@@ -36,6 +36,8 @@ public static function getInfo() {
   function testLanguageList() {
     global $base_url;
 
+    $this->rebuildContainer();
+
     // User to add and remove language.
     $admin_user = $this->drupalCreateUser(array('administer languages', 'access administration pages', 'administer site configuration'));
     $this->drupalLogin($admin_user);
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestContainerTest.php b/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestContainerTest.php
new file mode 100644
index 0000000..0442b0c
--- /dev/null
+++ b/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestContainerTest.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * @file
+ * Contains \Drupal\simpletest\Tests\SimpleTestContainerTest.
+ */
+
+namespace Drupal\simpletest\Tests;
+
+use Drupal\simpletest\WebTestBase;
+
+/**
+ */
+class SimpleTestContainerTest extends WebTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = array('comment', 'simpletest_container');
+
+  public function setUp() {
+    parent::setUp();
+    \Drupal::config('why.me')->set('key', 'value')->save();
+  }
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Tests simpletest container',
+      'description' => 'Verifies that tests in other installation profiles are not found.',
+      'group' => 'SimpleTest',
+    );
+  }
+
+  public function testContainer() {
+    $event_subscriber_this = $this->container->get('simpletest_container.event_subscriber');
+    $event_subscriber_drupal = \Drupal::service('simpletest_container.event_subscriber');
+    $this->assertIdentical($event_subscriber_drupal, $event_subscriber_this, '\Drupal and $this->container both return the same service');
+    $this->assertTrue($event_subscriber_this->compareContainers(), 'The event subscriber was constructed with the same container as currently in \Drupal');
+
+    // But at some point something got out of kilter!
+    $this->assertFalse(\Drupal::state()->get('simpletest_container_different', FALSE), 'At some point \Drupal\simpletest_container\EventSubscriber:doCheckAndSetState() was called and the container used in the __constructor was out of sync with \Drupal::getContainer().');
+  }
+}
\ No newline at end of file
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
index 265012e..6e49f95 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
@@ -827,7 +827,6 @@ protected function setUp() {
       $modules = array_unique($modules);
       $success = \Drupal::moduleHandler()->install($modules, TRUE);
       $this->assertTrue($success, t('Enabled modules: %modules', array('%modules' => implode(', ', $modules))));
-      $this->rebuildContainer();
     }
 
     // Reset/rebuild all data structures after enabling the modules.
diff --git a/core/modules/simpletest/tests/modules/simpletest_container/lib/Drupal/simpletest_container/EventSubscriber.php b/core/modules/simpletest/tests/modules/simpletest_container/lib/Drupal/simpletest_container/EventSubscriber.php
new file mode 100644
index 0000000..fa03ba5
--- /dev/null
+++ b/core/modules/simpletest/tests/modules/simpletest_container/lib/Drupal/simpletest_container/EventSubscriber.php
@@ -0,0 +1,62 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\simpletest_container\EventSubscriber.
+ */
+
+namespace Drupal\simpletest_container;
+
+use Drupal\Core\KeyValueStore\StateInterface;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+
+class EventSubscriber implements EventSubscriberInterface {
+
+  /**
+   * The container at construction time.
+   *
+   * @var \Symfony\Component\DependencyInjection\ContainerInterface
+   */
+  protected $container;
+
+  /**
+   * The key value store.
+   *
+   * @var \Drupal\Core\KeyValueStore\StateInterface
+   */
+  protected $state;
+
+  /**
+   * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
+   *   The service container.
+   * @param \Drupal\Core\KeyValueStore\StateInterface $state
+   *   The key value store.
+   */
+  public function __construct(ContainerInterface $container, StateInterface $state) {
+    $this->container = $container;
+    $this->state = $state;
+  }
+
+  public function compareContainers() {
+    return $this->container === \Drupal::getContainer();
+  }
+
+
+  public function doCheckAndSetState(){
+    if (!$this->compareContainers()) {
+      $this->state->set('simpletest_container_different', TRUE);
+    }
+  }
+
+  /**
+   * Registers the methods in this class that should be listeners.
+   *
+   * @return array
+   *   An array of event listener definitions.
+   */
+  static function getSubscribedEvents() {
+    $events['config.save'][] = array('doCheckAndSetState', 40);
+    return $events;
+  }
+}
diff --git a/core/modules/simpletest/tests/modules/simpletest_container/simpletest_container.info.yml b/core/modules/simpletest/tests/modules/simpletest_container/simpletest_container.info.yml
new file mode 100644
index 0000000..2f6cc23
--- /dev/null
+++ b/core/modules/simpletest/tests/modules/simpletest_container/simpletest_container.info.yml
@@ -0,0 +1,7 @@
+name: Simpletest container Test
+type: module
+description: 'Provides dummy classes for use by SimpleTest tests.'
+package: Testing
+version: VERSION
+core: 8.x
+hidden: TRUE
diff --git a/core/modules/simpletest/tests/modules/simpletest_container/simpletest_container.module b/core/modules/simpletest/tests/modules/simpletest_container/simpletest_container.module
new file mode 100644
index 0000000..b3d9bbc
--- /dev/null
+++ b/core/modules/simpletest/tests/modules/simpletest_container/simpletest_container.module
@@ -0,0 +1 @@
+<?php
diff --git a/core/modules/simpletest/tests/modules/simpletest_container/simpletest_container.services.yml b/core/modules/simpletest/tests/modules/simpletest_container/simpletest_container.services.yml
new file mode 100644
index 0000000..009e307
--- /dev/null
+++ b/core/modules/simpletest/tests/modules/simpletest_container/simpletest_container.services.yml
@@ -0,0 +1,6 @@
+services:
+  simpletest_container.event_subscriber:
+    class: Drupal\simpletest_container\EventSubscriber
+    arguments: ['@service_container', '@state']
+    tags:
+      - { name: event_subscriber, priority: 1 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Path/UrlAlterFunctionalTest.php b/core/modules/system/lib/Drupal/system/Tests/Path/UrlAlterFunctionalTest.php
index 35a4ef7..3d89d86 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Path/UrlAlterFunctionalTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Path/UrlAlterFunctionalTest.php
@@ -33,6 +33,7 @@ public static function getInfo() {
    * Test that URL altering works and that it occurs in the correct order.
    */
   function testUrlAlter() {
+    $this->rebuildContainer();
     $account = $this->drupalCreateUser(array('administer url aliases'));
     $this->drupalLogin($account);
 
diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigDebugMarkupTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigDebugMarkupTest.php
index 3a26efe..9024f38 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigDebugMarkupTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigDebugMarkupTest.php
@@ -38,7 +38,6 @@ function testTwigDebugMarkup() {
     \Drupal::config('system.theme')->set('default', 'test_theme')->save();
     // Enable debug, rebuild the service container, and clear all caches.
     $this->settingsSet('twig_debug', TRUE);
-    $this->rebuildContainer();
     $this->resetAll();
 
     $cache = $this->container->get('theme.registry')->get();
@@ -65,7 +64,6 @@ function testTwigDebugMarkup() {
 
     // Disable debug, rebuild the service container, and clear all caches.
     $this->settingsSet('twig_debug', FALSE);
-    $this->rebuildContainer();
     $this->resetAll();
 
     $output = theme('node', node_view($node));
diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewTestBase.php b/core/modules/views/lib/Drupal/views/Tests/ViewTestBase.php
index e77757e..808caac 100644
--- a/core/modules/views/lib/Drupal/views/Tests/ViewTestBase.php
+++ b/core/modules/views/lib/Drupal/views/Tests/ViewTestBase.php
@@ -54,7 +54,6 @@ protected function enableViewsTestModule() {
 
     \Drupal::moduleHandler()->install(array('views_test_data'));
     $this->resetAll();
-    $this->rebuildContainer();
     $this->container->get('module_handler')->reload();
 
     // Load the test dataset.
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Tests/ViewEditTest.php b/core/modules/views_ui/lib/Drupal/views_ui/Tests/ViewEditTest.php
index 27655a8..6f8e9ec 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/Tests/ViewEditTest.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/Tests/ViewEditTest.php
@@ -61,8 +61,6 @@ public function testEditFormOtherOptions() {
     // A node view should have language options.
     $this->container->get('module_handler')->install(array('node', 'language'));
     $this->resetAll();
-    $this->rebuildContainer();
-    entity_info_cache_clear();
 
     $this->drupalGet('admin/structure/views/nojs/display/test_display/page_1/field_langcode');
     $this->assertResponse(200);
