diff -u b/core/lib/Drupal/Core/Config/ConfigFactory.php b/core/lib/Drupal/Core/Config/ConfigFactory.php --- b/core/lib/Drupal/Core/Config/ConfigFactory.php +++ b/core/lib/Drupal/Core/Config/ConfigFactory.php @@ -61,7 +61,7 @@ // be slow in PHP). if (!is_object($this->configObject)) { $class = $this->container->getParameter('config.object'); - $this->configObject = new $class($this->container->get('config.manager')); + $this->configObject = new $class($this->container->get('config.manager')); } return $this->configObject; } diff -u b/core/modules/config/config_test/config_test.module b/core/modules/config/config_test/config_test.module --- b/core/modules/config/config_test/config_test.module +++ b/core/modules/config/config_test/config_test.module @@ -82,7 +82,9 @@ * The ID of the ConfigTest object to load. */ function config_test_load($id) { - $config = config('config_test.dynamic.' . $id); + // config returns the config object used to load all config in order to use + // this safely later we need to clone the object to protect it from change. + $config = clone config('config_test.dynamic.' . $id); // @todo Requires a more reliable + generic method to check for whether the // configuration object exists. if ($config->get('id') === NULL) {