diff --git a/core/includes/module.inc b/core/includes/module.inc
index c1d99f2..9fbdfe9 100644
--- a/core/includes/module.inc
+++ b/core/includes/module.inc
@@ -6,6 +6,7 @@
  */
 
 use Drupal\Component\Graph\Graph;
+use Drupal\Core\DrupalKernel;
 
 /**
  * Loads all enabled modules.
@@ -475,9 +476,9 @@ function module_enable($module_list, $enable_dependencies = TRUE) {
 
   $modules_installed = array();
   $modules_enabled = array();
-  $schema_store = drupal_container()->get('keyvalue')->get('system.schema');
   $module_config = config('system.module');
   $disabled_config = config('system.module.disabled');
+  $enabled_modules_list = module_list();
   foreach ($module_list as $module) {
     // Only process modules that are not already enabled.
     $enabled = $module_config->get("enabled.$module") !== NULL;
@@ -542,6 +543,12 @@ function module_enable($module_list, $enable_dependencies = TRUE) {
       entity_info_cache_clear();
       module_invoke_all('modules_preenable', array($module));
 
+      // Rebuild the dependency injection container.
+      $enabled_modules_list[$module] = $module;
+      drupal_container(NULL, TRUE);
+      $kernel = new DrupalKernel('prod', FALSE, $enabled_modules_list);
+      $kernel->boot();
+
       // Enable the module.
       module_invoke($module, 'enable');
 
@@ -608,6 +615,7 @@ function module_disable($module_list, $disable_dependents = TRUE) {
 
   $module_config = config('system.module');
   $disabled_config = config('system.module.disabled');
+  $enabled_modules_list = module_list();
   foreach ($module_list as $module) {
     if (module_exists($module)) {
       module_load_install($module);
@@ -619,6 +627,12 @@ function module_disable($module_list, $disable_dependents = TRUE) {
         ->clear("enabled.$module")
         ->save();
       $invoke_modules[] = $module;
+
+      unset($enabled_modules_list[$module]);
+      drupal_container(NULL, TRUE);
+      $kernel = new DrupalKernel('prod', FALSE, $enabled_modules_list);
+      $kernel->boot();
+
       watchdog('system', '%module module disabled.', array('%module' => $module), WATCHDOG_INFO);
     }
   }
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 3fa0d1d..de2bb77 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Bundle/BundleTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Bundle/BundleTest.php
@@ -41,4 +41,19 @@ function testBundleRegistration() {
     $this->drupalGet('');
     $this->assertText(t('The bundle_test event subscriber fired!'), 'The bundle_test event subscriber fired');
   }
+
+  /**
+   * Tests module bundle services in the request that enables a module.
+   */
+  function testBundleRegistrationAfterEnableDisable() {
+    // Test that the bundle is registered after enabling a module.
+    module_enable(array('bundle_test_dependent'));
+    $service_exists = in_array('bundle_test_dependent.test_service', drupal_container()->getServiceIds());
+    $this->assertTrue($service_exists, 'The bundle_test_dependent.test_service exists on the container.');
+
+    // Test that the bundle is no longer registered after disabling a module.
+    module_disable(array('bundle_test_dependent'));
+    $service_exists = in_array('bundle_test_dependent.test_service', drupal_container()->getServiceIds());
+    $this->assertFalse($service_exists, 'The bundle_test_dependent.test_service does not exist on the container.');
+  }
 }
diff --git a/core/modules/system/tests/modules/bundle_test_dependent/bundle_test_dependent.info b/core/modules/system/tests/modules/bundle_test_dependent/bundle_test_dependent.info
new file mode 100644
index 0000000..3f7e3ec
--- /dev/null
+++ b/core/modules/system/tests/modules/bundle_test_dependent/bundle_test_dependent.info
@@ -0,0 +1,6 @@
+name = "Bundle test dependent"
+description = "Support module for bundle testing."
+package = Testing
+version = VERSION
+core = 8.x
+hidden = TRUE
diff --git a/core/modules/system/tests/modules/bundle_test_dependent/bundle_test_dependent.module b/core/modules/system/tests/modules/bundle_test_dependent/bundle_test_dependent.module
new file mode 100644
index 0000000..eb498dd
--- /dev/null
+++ b/core/modules/system/tests/modules/bundle_test_dependent/bundle_test_dependent.module
@@ -0,0 +1,6 @@
+<?php
+
+/**
+ * @file
+ * No hook implementations or API functions at this time. Just PSR-0 classes.
+ */
diff --git a/core/modules/system/tests/modules/bundle_test_dependent/lib/Drupal/bundle_test_dependent/BundleTestDependentBundle.php b/core/modules/system/tests/modules/bundle_test_dependent/lib/Drupal/bundle_test_dependent/BundleTestDependentBundle.php
new file mode 100644
index 0000000..720e490
--- /dev/null
+++ b/core/modules/system/tests/modules/bundle_test_dependent/lib/Drupal/bundle_test_dependent/BundleTestDependentBundle.php
@@ -0,0 +1,24 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\bundle_test_dependent\BundleTestDependentBundle.
+ */
+
+namespace Drupal\bundle_test_dependent;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\HttpKernel\Bundle\Bundle;
+
+/**
+ * Defines a test bundle class.
+ */
+class BundleTestDependentBundle extends Bundle {
+
+  /**
+   * Overrides \Symfony\Component\HttpKernel\Bundle\Bundle::build().
+   */
+  public function build(ContainerBuilder $container) {
+    $container->register('bundle_test_dependent.test_service', 'Drupal\bundle_test_dependent\TestClass');
+  }
+}
diff --git a/core/modules/system/tests/modules/bundle_test_dependent/lib/Drupal/bundle_test_dependent/TestClass.php b/core/modules/system/tests/modules/bundle_test_dependent/lib/Drupal/bundle_test_dependent/TestClass.php
new file mode 100644
index 0000000..54b6a27
--- /dev/null
+++ b/core/modules/system/tests/modules/bundle_test_dependent/lib/Drupal/bundle_test_dependent/TestClass.php
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\bundle_test_dependent\TestClass.
+ */
+
+namespace Drupal\bundle_test_dependent;
+
+/**
+ * Defines a simple test service.
+ */
+class TestClass {
+
+}
