diff --git a/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php b/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php
index d7fc8d6..e245874 100644
--- a/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php
+++ b/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php
@@ -65,11 +65,6 @@ public function getDefinitions() {
   protected function getDerivatives(array $base_plugin_definitions) {
     $plugin_definitions = array();
     foreach ($base_plugin_definitions as $base_plugin_id => $plugin_definition) {
-      // @todo Remove this check once http://drupal.org/node/1780396 is resolved.
-      if (isset($plugin_definition['module']) && !module_exists($plugin_definition['module'])) {
-        continue;
-      }
-
       $derivative_fetcher = $this->getDerivativeFetcher($base_plugin_id, $plugin_definition);
       if ($derivative_fetcher) {
         $derivative_definitions = $derivative_fetcher->getDerivativeDefinitions($plugin_definition);
diff --git a/core/lib/Drupal/Core/Condition/ConditionManager.php b/core/lib/Drupal/Core/Condition/ConditionManager.php
index c7cdb60..2f4c060 100644
--- a/core/lib/Drupal/Core/Condition/ConditionManager.php
+++ b/core/lib/Drupal/Core/Condition/ConditionManager.php
@@ -23,9 +23,12 @@ class ConditionManager extends PluginManagerBase implements ExecutableManagerInt
 
   /**
    * Constructs aa ConditionManager object.
+   *
+   * @param array $namespaces
+   *   An array of paths keyed by it's corresponding namespaces.
    */
-  public function __construct() {
-    $this->discovery = new AnnotatedClassDiscovery('Core', 'Condition');
+  public function __construct(array $namespaces) {
+    $this->discovery = new AnnotatedClassDiscovery('Core', 'Condition', $namespaces);
     $this->discovery = new DerivativeDiscoveryDecorator($this->discovery);
     $this->discovery = new AlterDecorator($this->discovery, 'condition_info');
     $this->discovery = new CacheDecorator($this->discovery, 'condition:' . language(LANGUAGE_TYPE_INTERFACE)->langcode);
diff --git a/core/lib/Drupal/Core/CoreBundle.php b/core/lib/Drupal/Core/CoreBundle.php
index cc4e4aa..ea7f891 100644
--- a/core/lib/Drupal/Core/CoreBundle.php
+++ b/core/lib/Drupal/Core/CoreBundle.php
@@ -125,7 +125,8 @@ public function build(ContainerBuilder $container) {
       ->addMethodCall('setUserAgent', array('Drupal (+http://drupal.org/)'));
 
     // Register the EntityManager.
-    $container->register('plugin.manager.entity', 'Drupal\Core\Entity\EntityManager');
+    $container->register('plugin.manager.entity', 'Drupal\Core\Entity\EntityManager')
+      ->addArgument('%container.namespaces%');
 
     // The 'request' scope and service enable services to depend on the Request
     // object and get reconstructed when the request object changes (e.g.,
@@ -165,7 +166,8 @@ public function build(ContainerBuilder $container) {
       ->addArgument('slave');
     $container->register('typed_data', 'Drupal\Core\TypedData\TypedDataManager')
       ->addMethodCall('setValidationConstraintManager', array(new Reference('validation.constraint')));
-    $container->register('validation.constraint', 'Drupal\Core\Validation\ConstraintManager');
+    $container->register('validation.constraint', 'Drupal\Core\Validation\ConstraintManager')
+      ->addArgument('%container.namespaces%');
 
     // Add the user's storage for temporary, non-cache data.
     $container->register('lock', 'Drupal\Core\Lock\DatabaseLockBackend');
diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index d56f503..729ff78 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -168,7 +168,7 @@ public function registerBundles() {
       $module_list = $this->configStorage->read('system.module');
       $this->moduleList = isset($module_list['enabled']) ? $module_list['enabled'] : array();
     }
-    $this->registerModuleNamespaces($this->getModuleFileNames());
+    $this->registerNamespaces($this->getModuleNamespaces($this->getModuleFileNames()));
 
     // Load each module's bundle class.
     foreach ($this->moduleList as $module => $weight) {
@@ -295,7 +295,7 @@ protected function initializeContainer() {
       // from the container.
       $container_modules = $this->container->getParameter('container.modules');
       $namespaces_before = $this->classLoader->getNamespaces();
-      $this->registerModuleNamespaces($container_modules);
+      $this->registerNamespaces($this->getModuleNamespaces($container_modules));
 
       // If 'container.modules' is wrong, the container must be rebuilt.
       if (!isset($this->moduleList)) {
@@ -368,6 +368,13 @@ protected function buildContainer() {
     $container = $this->getContainerBuilder();
     $container->setParameter('container.bundles', $this->bundleClasses);
     $container->setParameter('container.modules', $this->getModuleFileNames());
+
+    // Get a list of namespaces and put it onto the container.
+    $namespaces = $this->getModuleNamespaces($this->getModuleFileNames());
+    $namespaces['Drupal\Core'] = DRUPAL_ROOT . '/core/lib';
+    $namespaces['Drupal\Component'] = DRUPAL_ROOT . '/core/lib';
+    $container->setParameter('container.namespaces', $namespaces);
+
     // Register synthetic services.
     $container->register('class_loader', 'Symfony\Component\ClassLoader\UniversalClassLoader')->setSynthetic(TRUE);
     $container->register('kernel', 'Symfony\Component\HttpKernel\KernelInterface')->setSynthetic(TRUE);
@@ -453,11 +460,22 @@ protected function getModuleFileNames() {
   }
 
   /**
-   * Registers the namespace of each enabled module with the class loader.
+   * Gets the namespaces of each enabled module.
    */
-  protected function registerModuleNamespaces($moduleFileNames) {
+  protected function getModuleNamespaces($moduleFileNames) {
+    $namespaces = array();
     foreach ($moduleFileNames as $module => $filename) {
-      $this->classLoader->registerNamespace("Drupal\\$module", DRUPAL_ROOT . '/' . dirname($filename) . '/lib');
+      $namespaces["Drupal\\$module"] = DRUPAL_ROOT . '/' . dirname($filename) . '/lib';
+    }
+    return $namespaces;
+  }
+
+  /**
+   * Registers a list of namespaces.
+   */
+  protected function registerNamespaces(array $namespaces = array()) {
+    foreach ($namespaces as $namespace => $dir) {
+      $this->classLoader->registerNamespace($namespace, $dir);
     }
   }
 }
diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php
index 566b2cc..a0d7c03 100644
--- a/core/lib/Drupal/Core/Entity/EntityManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityManager.php
@@ -168,10 +168,13 @@ class EntityManager extends PluginManagerBase {
 
   /**
    * Constructs a new Entity plugin manager.
+   *
+   * @param array $namespaces
+   *   An array of paths keyed by it's corresponding namespaces.
    */
-  public function __construct() {
+  public function __construct(array $namespaces) {
     // Allow the plugin definition to be altered by hook_entity_info_alter().
-    $this->discovery = new AnnotatedClassDiscovery('Core', 'Entity');
+    $this->discovery = new AnnotatedClassDiscovery('Core', 'Entity', $namespaces);
     $this->discovery = new InfoHookDecorator($this->discovery, 'entity_info');
     $this->discovery = new ProcessDecorator($this->discovery, array($this, 'processDefinition'));
     $this->discovery = new AlterDecorator($this->discovery, 'entity_info');
@@ -186,12 +189,6 @@ public function __construct() {
   public function processDefinition(&$definition, $plugin_id) {
     parent::processDefinition($definition, $plugin_id);
 
-    // @todo Remove this check once http://drupal.org/node/1780396 is resolved.
-    if (!module_exists($definition['module'])) {
-      $definition = NULL;
-      return;
-    }
-
     // Prepare entity schema fields SQL info for
     // Drupal\Core\Entity\DatabaseStorageControllerInterface::buildQuery().
     if (isset($definition['base_table'])) {
diff --git a/core/lib/Drupal/Core/Plugin/Discovery/AnnotatedClassDiscovery.php b/core/lib/Drupal/Core/Plugin/Discovery/AnnotatedClassDiscovery.php
index 0b387dc..d15696a 100644
--- a/core/lib/Drupal/Core/Plugin/Discovery/AnnotatedClassDiscovery.php
+++ b/core/lib/Drupal/Core/Plugin/Discovery/AnnotatedClassDiscovery.php
@@ -16,8 +16,17 @@ class AnnotatedClassDiscovery extends ComponentAnnotatedClassDiscovery {
 
   /**
    * Constructs an AnnotatedClassDiscovery object.
+   *
+   * @param string $owner
+   *   The module name that defines the plugin type.
+   * @param string $type
+   *   The plugin type, for example filter.
+   * @param array $root_namespaces
+   *
+   * @param array $plugin_namespaces
+   *   An array of paths keyed by it's corresponding namespaces.
    */
-  function __construct($owner, $type, $root_namespaces = NULL) {
+  function __construct($owner, $type, array $root_namespaces = array(), array $plugin_namespaces = array()) {
     $this->owner = $owner;
     $this->type = $type;
     $this->rootNamespaces = $root_namespaces;
@@ -25,21 +34,24 @@ function __construct($owner, $type, $root_namespaces = NULL) {
       'Drupal\Component\Annotation' => DRUPAL_ROOT . '/core/lib',
       'Drupal\Core\Annotation' => DRUPAL_ROOT . '/core/lib',
     );
-    parent::__construct(array(), $annotation_namespaces, 'Drupal\Core\Annotation\Plugin');
+    parent::__construct($plugin_namespaces, $annotation_namespaces, 'Drupal\Core\Annotation\Plugin');
   }
 
   /**
    * Overrides Drupal\Component\Plugin\Discovery\AnnotatedClassDiscovery::getPluginNamespaces().
    *
+   * @todo Figure out how to let this comment still be TRUE.
    * This is overridden rather than set in the constructor, because Drupal
    * modules can be enabled (and therefore, namespaces registered) during the
    * lifetime of a plugin manager.
    */
   protected function getPluginNamespaces() {
+    if (!empty($this->pluginNamespaces)) {
+      return parent::getPluginNamespaces();
+    }
     $plugin_namespaces = array();
-    $root_namespaces = isset($this->rootNamespaces) ? $this->rootNamespaces : drupal_classloader()->getNamespaces();
-    foreach ($root_namespaces as $namespace => $dirs) {
-      $plugin_namespaces["$namespace\\Plugin\\{$this->owner}\\{$this->type}"] = $dirs;
+    foreach ($this->rootNamespaces as $namespace => $dir) {
+      $plugin_namespaces["$namespace\\Plugin\\{$this->owner}\\{$this->type}"] = array($dir);
     }
     return $plugin_namespaces;
   }
diff --git a/core/lib/Drupal/Core/Validation/ConstraintManager.php b/core/lib/Drupal/Core/Validation/ConstraintManager.php
index 5177f09..e0444ae 100644
--- a/core/lib/Drupal/Core/Validation/ConstraintManager.php
+++ b/core/lib/Drupal/Core/Validation/ConstraintManager.php
@@ -38,9 +38,12 @@ class ConstraintManager extends PluginManagerBase {
 
   /**
    * Overrides \Drupal\Component\Plugin\PluginManagerBase::__construct().
+   *
+   * @param array $namespaces
+   *   An array of paths keyed by it's corresponding namespaces.
    */
-  public function __construct() {
-    $this->discovery = new AnnotatedClassDiscovery('Validation', 'Constraint');
+  public function __construct(array $namespaces) {
+    $this->discovery = new AnnotatedClassDiscovery('Validation', 'Constraint', $namespaces);
     $this->discovery = new StaticDiscoveryDecorator($this->discovery, array($this, 'registerDefinitions'));
     $this->discovery = new DerivativeDiscoveryDecorator($this->discovery);
     $this->discovery = new ProcessDecorator($this->discovery, array($this, 'processDefinition'));
diff --git a/core/modules/aggregator/aggregator.admin.inc b/core/modules/aggregator/aggregator.admin.inc
index f87d9a0..632f1ec 100644
--- a/core/modules/aggregator/aggregator.admin.inc
+++ b/core/modules/aggregator/aggregator.admin.inc
@@ -6,7 +6,6 @@
  */
 
 use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
-use Drupal\aggregator\Plugin\FetcherManager;
 use Drupal\aggregator\Plugin\Core\Entity\Feed;
 
 /**
@@ -346,7 +345,7 @@ function aggregator_admin_form($form, $form_state) {
   aggregator_sanitize_configuration();
 
   // Get all available fetchers.
-  $fetcher_manager = new FetcherManager();
+  $fetcher_manager = drupal_container()->get('plugin.manager.aggregator.fetcher');
   $fetchers = array();
   foreach ($fetcher_manager->getDefinitions() as $id => $definition) {
     $label = $definition['title'] . ' <span class="description">' . $definition['description'] . '</span>';
diff --git a/core/modules/aggregator/aggregator.module b/core/modules/aggregator/aggregator.module
index 7298e4c..6e89fde 100644
--- a/core/modules/aggregator/aggregator.module
+++ b/core/modules/aggregator/aggregator.module
@@ -5,7 +5,6 @@
  * Used to aggregate syndicated content (RSS, RDF, and Atom).
  */
 
-use Drupal\aggregator\Plugin\FetcherManager;
 use Drupal\aggregator\Plugin\Core\Entity\Feed;
 
 /**
@@ -450,7 +449,7 @@ function aggregator_refresh(Feed $feed) {
   list($fetcher, $parser, $processors) = _aggregator_get_variables();
 
   // Fetch the feed.
-  $fetcher_manager = new FetcherManager();
+  $fetcher_manager = drupal_container()->get('plugin.manager.aggregator.fetcher');
   try {
     $success = $fetcher_manager->createInstance($fetcher)->fetch($feed);
   }
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/AggregatorBundle.php b/core/modules/aggregator/lib/Drupal/aggregator/AggregatorBundle.php
new file mode 100644
index 0000000..9c97d9a
--- /dev/null
+++ b/core/modules/aggregator/lib/Drupal/aggregator/AggregatorBundle.php
@@ -0,0 +1,26 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\aggregator\AggregatorBundle.
+ */
+
+namespace Drupal\aggregator;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\HttpKernel\Bundle\Bundle;
+
+/**
+ * Registers aggregator module's services to the container.
+ */
+class AggregatorBundle extends Bundle {
+
+  /**
+   * Overrides Bundle::build().
+   */
+  public function build(ContainerBuilder $container) {
+    $container->register('plugin.manager.aggregator.fetcher', 'Drupal\aggregator\Plugin\FetcherManager')
+      ->addArgument('%container.namespaces%');
+  }
+
+}
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/FetcherManager.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/FetcherManager.php
index fa63c23..be8fc79 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/FetcherManager.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/FetcherManager.php
@@ -17,8 +17,14 @@
  */
 class FetcherManager extends PluginManagerBase {
 
-  public function __construct() {
-    $this->discovery = new AnnotatedClassDiscovery('aggregator', 'fetcher');
+  /**
+   * Constructs a FetcherManager object.
+   *
+   * @param array $namespaces
+   *   An array of paths keyed by it's corresponding namespaces.
+   */
+  public function __construct(array $namespaces) {
+    $this->discovery = new AnnotatedClassDiscovery('aggregator', 'fetcher', $namespaces);
     $this->discovery = new CacheDecorator($this->discovery, 'aggregator_fetcher:' . language(LANGUAGE_TYPE_INTERFACE)->langcode);
     $this->factory = new DefaultFactory($this->discovery);
   }
diff --git a/core/modules/block/lib/Drupal/block/BlockBundle.php b/core/modules/block/lib/Drupal/block/BlockBundle.php
index a20d06a..71dfd33 100644
--- a/core/modules/block/lib/Drupal/block/BlockBundle.php
+++ b/core/modules/block/lib/Drupal/block/BlockBundle.php
@@ -20,7 +20,8 @@ class BlockBundle extends Bundle {
    */
   public function build(ContainerBuilder $container) {
     // Register the BlockManager class with the dependency injection container.
-    $container->register('plugin.manager.block', 'Drupal\block\Plugin\Type\BlockManager');
+    $container->register('plugin.manager.block', 'Drupal\block\Plugin\Type\BlockManager')
+      ->addArgument('%container.namespaces%');
   }
 
 }
diff --git a/core/modules/block/lib/Drupal/block/Plugin/Type/BlockManager.php b/core/modules/block/lib/Drupal/block/Plugin/Type/BlockManager.php
index 91951a9..d5dedb9 100644
--- a/core/modules/block/lib/Drupal/block/Plugin/Type/BlockManager.php
+++ b/core/modules/block/lib/Drupal/block/Plugin/Type/BlockManager.php
@@ -26,9 +26,12 @@ class BlockManager extends PluginManagerBase {
 
   /**
    * Constructs a new \Drupal\block\Plugin\Type\BlockManager object.
+   *
+   * @param array $namespaces
+   *   An array of paths keyed by it's corresponding namespaces.
    */
-  public function __construct() {
-    $this->discovery = new AnnotatedClassDiscovery('block', 'block');
+  public function __construct(array $namespaces) {
+    $this->discovery = new AnnotatedClassDiscovery('block', 'block', $namespaces);
     $this->discovery = new DerivativeDiscoveryDecorator($this->discovery);
     $this->discovery = new AlterDecorator($this->discovery, 'block');
     $this->discovery = new CacheDecorator($this->discovery, 'block_plugins:' . language(LANGUAGE_TYPE_INTERFACE)->langcode, 'cache_block', CacheBackendInterface::CACHE_PERMANENT, array('block'));
@@ -37,7 +40,7 @@ public function __construct() {
   /**
    * Overrides \Drupal\Component\Plugin\PluginManagerBase::createInstance().
    */
-  public function createInstance($plugin_id, array $configuration = array(), Block $entity = NULl) {
+  public function createInstance($plugin_id, array $configuration = array(), Block $entity = NULL) {
     $plugin_class = DefaultFactory::getPluginClass($plugin_id, $this->discovery);
     return new $plugin_class($configuration, $plugin_id, $this->discovery, $entity);
   }
diff --git a/core/modules/block/lib/Drupal/block/Plugin/system/plugin_ui/BlockPluginUI.php b/core/modules/block/lib/Drupal/block/Plugin/system/plugin_ui/BlockPluginUI.php
index 740b349..5beb482 100644
--- a/core/modules/block/lib/Drupal/block/Plugin/system/plugin_ui/BlockPluginUI.php
+++ b/core/modules/block/lib/Drupal/block/Plugin/system/plugin_ui/BlockPluginUI.php
@@ -24,7 +24,7 @@
  *     "module" = @Translation("Modules")
  *   },
  *   link_title = @Translation("Configure block"),
- *   manager = "Drupal\block\Plugin\Type\BlockManager",
+ *   manager = "plugin.manager.block",
  *   menu = TRUE,
  *   path = "admin/structure/block/list",
  *   suffix = "add",
@@ -46,7 +46,8 @@ public function form($form, &$form_state, $facet = NULL) {
     // @todo Add an inline comment here.
     list($plugin, $theme) = explode(':', $this->getPluginId());
     $plugin_definition = $this->getDefinition();
-    $manager = new $plugin_definition['manager']();
+    // @todo Find out how to let the manager be injected into the class.
+    $manager = drupal_container()->get($plugin_definition['manager']);
     $plugins = $manager->getDefinitions();
     $form['#theme'] = 'system_plugin_ui_form';
     $form['theme'] = array(
diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginManager.php b/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginManager.php
index 57a3a4b..5500241 100644
--- a/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginManager.php
+++ b/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginManager.php
@@ -23,10 +23,12 @@ class CKEditorPluginManager extends PluginManagerBase {
 
   /**
    * Overrides \Drupal\Component\Plugin\PluginManagerBase::__construct().
+   *
+   * @param array $namespaces
+   *   An array of paths keyed by it's corresponding namespaces.
    */
-  public function __construct() {
-    $this->discovery = new AnnotatedClassDiscovery('ckeditor', 'plugin');
-    $this->discovery = new ProcessDecorator($this->discovery, array($this, 'processDefinition'));
+  public function __construct(array $namespaces) {
+    $this->discovery = new AnnotatedClassDiscovery('ckeditor', 'plugin', $namespaces);
     $this->discovery = new AlterDecorator($this->discovery, 'ckeditor_plugin_info');
     $this->discovery = new CacheDecorator($this->discovery, 'ckeditor_plugin');
     $this->factory = new DefaultFactory($this->discovery);
@@ -141,18 +143,4 @@ public function injectPluginSettingsForm(array &$form, array &$form_state, Edito
       }
     }
   }
-
-  /**
-   * Overrides Drupal\Component\Plugin\PluginManagerBase::processDefinition().
-   */
-  public function processDefinition(&$definition, $plugin_id) {
-    parent::processDefinition($definition, $plugin_id);
-
-    // @todo Remove this check once http://drupal.org/node/1780396 is resolved.
-    if (!module_exists($definition['module'])) {
-      $definition = NULL;
-      return;
-    }
-  }
-
 }
diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/CkeditorBundle.php b/core/modules/ckeditor/lib/Drupal/ckeditor/CkeditorBundle.php
index eb8af12..151c23a 100644
--- a/core/modules/ckeditor/lib/Drupal/ckeditor/CkeditorBundle.php
+++ b/core/modules/ckeditor/lib/Drupal/ckeditor/CkeditorBundle.php
@@ -20,7 +20,8 @@ class CKEditorBundle extends Bundle {
    * Overrides Symfony\Component\HttpKernel\Bundle\Bundle::build().
    */
   public function build(ContainerBuilder $container) {
-    $container->register('plugin.manager.ckeditor.plugin', 'Drupal\ckeditor\CKEditorPluginManager');
+    $container->register('plugin.manager.ckeditor.plugin', 'Drupal\ckeditor\CKEditorPluginManager')
+      ->addArgument('%container.namespaces%');
   }
 
 }
diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorPluginManagerTest.php b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorPluginManagerTest.php
index fc56910..b7383d7 100644
--- a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorPluginManagerTest.php
+++ b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorPluginManagerTest.php
@@ -63,7 +63,7 @@ function setUp() {
    * Tests the enabling of plugins.
    */
   function testEnabledPlugins() {
-    $this->manager = new CKEditorPluginManager();
+    $this->manager = new CKEditorPluginManager($this->container->getParameter('container.namespaces'));
     $editor = entity_load('editor', 'filtered_html');
 
     // Case 1: no CKEditor plugins.
@@ -77,6 +77,7 @@ function testEnabledPlugins() {
     // variations of it, to cover all possible ways a plugin can be enabled) and
     // clear the editor manager's cache so it is picked up.
     $this->enableModules(array('ckeditor_test'));
+    $this->manager = new CKEditorPluginManager($this->container->getParameter('container.namespaces'));
     $this->manager->clearCachedDefinitions();
 
     // Case 2: CKEditor plugins are available.
diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php
index a71a725..fbfb93b 100644
--- a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php
+++ b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php
@@ -64,7 +64,7 @@ function setUp() {
     $editor->save();
 
     // Create "CKEditor" text editor plugin instance.
-    $manager = new EditorManager();
+    $manager = new EditorManager($this->container->getParameter('container.namespaces'));
     $this->ckeditor = $manager->createInstance('ckeditor');
   }
 
diff --git a/core/modules/edit/lib/Drupal/edit/EditBundle.php b/core/modules/edit/lib/Drupal/edit/EditBundle.php
index f64c29b..fe52594 100644
--- a/core/modules/edit/lib/Drupal/edit/EditBundle.php
+++ b/core/modules/edit/lib/Drupal/edit/EditBundle.php
@@ -20,7 +20,8 @@ class EditBundle extends Bundle {
    * Overrides Symfony\Component\HttpKernel\Bundle\Bundle::build().
    */
   public function build(ContainerBuilder $container) {
-    $container->register('plugin.manager.edit.editor', 'Drupal\edit\Plugin\EditorManager');
+    $container->register('plugin.manager.edit.editor', 'Drupal\edit\Plugin\EditorManager')
+      ->addArgument('%container.namespaces%');
 
     $container->register('access_check.edit.entity_field', 'Drupal\edit\Access\EditEntityFieldAccessCheck')
       ->addTag('access_check');
diff --git a/core/modules/edit/lib/Drupal/edit/Plugin/EditorManager.php b/core/modules/edit/lib/Drupal/edit/Plugin/EditorManager.php
index 66876a6..ce2d650 100644
--- a/core/modules/edit/lib/Drupal/edit/Plugin/EditorManager.php
+++ b/core/modules/edit/lib/Drupal/edit/Plugin/EditorManager.php
@@ -23,9 +23,12 @@ class EditorManager extends PluginManagerBase {
 
   /**
    * Overrides \Drupal\Component\Plugin\PluginManagerBase::__construct().
+   *
+   * @param array $namespaces
+   *   An array of paths keyed by it's corresponding namespaces.
    */
-  public function __construct() {
-    $this->discovery = new AnnotatedClassDiscovery('edit', 'editor');
+  public function __construct(array $namespaces) {
+    $this->discovery = new AnnotatedClassDiscovery('edit', 'editor', $namespaces);
     $this->discovery = new ProcessDecorator($this->discovery, array($this, 'processDefinition'));
     $this->discovery = new AlterDecorator($this->discovery, 'edit_editor');
     $this->discovery = new CacheDecorator($this->discovery, 'edit:editor');
diff --git a/core/modules/edit/lib/Drupal/edit/Tests/EditorSelectionTest.php b/core/modules/edit/lib/Drupal/edit/Tests/EditorSelectionTest.php
index 199a525..fdddec0 100644
--- a/core/modules/edit/lib/Drupal/edit/Tests/EditorSelectionTest.php
+++ b/core/modules/edit/lib/Drupal/edit/Tests/EditorSelectionTest.php
@@ -40,7 +40,7 @@ public static function getInfo() {
   function setUp() {
     parent::setUp();
 
-    $this->editorManager = new EditorManager();
+    $this->editorManager = new EditorManager($this->container->getParameter('container.namespaces'));
     $this->editorSelector = new EditorSelector($this->editorManager);
   }
 
@@ -108,7 +108,9 @@ function testText() {
   function testTextWysiwyg() {
     // Enable edit_test module so that the 'wysiwyg' Create.js PropertyEditor
     // widget becomes available.
-    $this->enableModules(array('edit_test'), FALSE);
+    $this->enableModules(array('edit_test'));
+    $this->editorManager = new EditorManager($this->container->getParameter('container.namespaces'));
+    $this->editorSelector = new EditorSelector($this->editorManager);
 
     $field_name = 'field_textarea';
     $this->createFieldWithInstance(
diff --git a/core/modules/edit/lib/Drupal/edit/Tests/MetadataGeneratorTest.php b/core/modules/edit/lib/Drupal/edit/Tests/MetadataGeneratorTest.php
index 364e4e0..529d535 100644
--- a/core/modules/edit/lib/Drupal/edit/Tests/MetadataGeneratorTest.php
+++ b/core/modules/edit/lib/Drupal/edit/Tests/MetadataGeneratorTest.php
@@ -58,7 +58,7 @@ function setUp() {
 
     $this->installSchema('field_test', 'test_entity_revision');
 
-    $this->editorManager = new EditorManager();
+    $this->editorManager = new EditorManager($this->container->getParameter('container.namespaces'));
     $this->accessChecker = new MockEditEntityFieldAccessCheck();
     $this->editorSelector = new EditorSelector($this->editorManager);
     $this->metadataGenerator = new MetadataGenerator($this->accessChecker, $this->editorSelector, $this->editorManager);
@@ -132,7 +132,10 @@ function testEditorWithCustomMetadata() {
 
     // Enable edit_test module so that the WYSIWYG Create.js PropertyEditor
     // widget becomes available.
-    $this->enableModules(array('edit_test'), FALSE);
+    $this->enableModules(array('edit_test'));
+    $this->editorManager = new EditorManager($this->container->getParameter('container.namespaces'));
+    $this->editorSelector = new EditorSelector($this->editorManager);
+    $this->metadataGenerator = new MetadataGenerator($this->accessChecker, $this->editorSelector, $this->editorManager);
 
     // Create a rich text field.
     $field_name = 'field_rich';
diff --git a/core/modules/editor/lib/Drupal/editor/EditorBundle.php b/core/modules/editor/lib/Drupal/editor/EditorBundle.php
index 1e4b86a..0338998 100644
--- a/core/modules/editor/lib/Drupal/editor/EditorBundle.php
+++ b/core/modules/editor/lib/Drupal/editor/EditorBundle.php
@@ -21,7 +21,8 @@ class EditorBundle extends Bundle {
   public function build(ContainerBuilder $container) {
     // Register the plugin manager for our plugin type with the dependency
     // injection container.
-    $container->register('plugin.manager.editor', 'Drupal\editor\Plugin\EditorManager');
+    $container->register('plugin.manager.editor', 'Drupal\editor\Plugin\EditorManager')
+      ->addArgument('%container.namespaces%');
   }
 
 }
diff --git a/core/modules/editor/lib/Drupal/editor/Plugin/EditorManager.php b/core/modules/editor/lib/Drupal/editor/Plugin/EditorManager.php
index 74a5eab..c267b5f 100644
--- a/core/modules/editor/lib/Drupal/editor/Plugin/EditorManager.php
+++ b/core/modules/editor/lib/Drupal/editor/Plugin/EditorManager.php
@@ -21,10 +21,12 @@ class EditorManager extends PluginManagerBase {
 
   /**
    * Overrides \Drupal\Component\Plugin\PluginManagerBase::__construct().
+   *
+   * @param array $namespaces
+   *   An array of paths keyed by it's corresponding namespaces.
    */
-  public function __construct() {
-    $this->discovery = new AnnotatedClassDiscovery('editor', 'editor');
-    $this->discovery = new ProcessDecorator($this->discovery, array($this, 'processDefinition'));
+  public function __construct(array $namespaces) {
+    $this->discovery = new AnnotatedClassDiscovery('editor', 'editor', $namespaces);
     $this->discovery = new AlterDecorator($this->discovery, 'editor_info');
     $this->discovery = new CacheDecorator($this->discovery, 'editor');
     $this->factory = new DefaultFactory($this->discovery);
@@ -92,17 +94,4 @@ public function getAttachments(array $format_ids) {
     return $attachments;
   }
 
-  /**
-   * Overrides Drupal\Component\Plugin\PluginManagerBase::processDefinition().
-   */
-  public function processDefinition(&$definition, $plugin_id) {
-    parent::processDefinition($definition, $plugin_id);
-
-    // @todo Remove this check once http://drupal.org/node/1780396 is resolved.
-    if (!module_exists($definition['module'])) {
-      $definition = NULL;
-      return;
-    }
-  }
-
 }
diff --git a/core/modules/editor/lib/Drupal/editor/Tests/EditorManagerTest.php b/core/modules/editor/lib/Drupal/editor/Tests/EditorManagerTest.php
index 3a83b8a..567db78 100644
--- a/core/modules/editor/lib/Drupal/editor/Tests/EditorManagerTest.php
+++ b/core/modules/editor/lib/Drupal/editor/Tests/EditorManagerTest.php
@@ -66,7 +66,7 @@ function setUp() {
    * Tests the configurable text editor manager.
    */
   function testManager() {
-    $this->editorManager = new EditorManager();
+    $this->editorManager = new EditorManager($this->container->getParameter('container.namespaces'));
 
     // Case 1: no text editor available:
     // - listOptions() should return an empty list of options
@@ -79,6 +79,7 @@ function testManager() {
     // Enable the Text Editor Test module, which has the Unicorn Editor and
     // clear the editor manager's cache so it is picked up.
     $this->enableModules(array('editor_test'));
+    $this->editorManager = new EditorManager($this->container->getParameter('container.namespaces'));
     $this->editorManager->clearCachedDefinitions();
 
     // Case 2: a text editor available.
diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceBundle.php b/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceBundle.php
index e490441..56bd797 100644
--- a/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceBundle.php
+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceBundle.php
@@ -21,6 +21,7 @@ class EntityReferenceBundle extends Bundle {
   public function build(ContainerBuilder $container) {
     // Register the SelectionPluginManager class with the dependency injection
     // container.
-    $container->register('plugin.manager.entity_reference.selection', 'Drupal\entity_reference\Plugin\Type\SelectionPluginManager');
+    $container->register('plugin.manager.entity_reference.selection', 'Drupal\entity_reference\Plugin\Type\SelectionPluginManager')
+      ->addArgument('%container.namespaces%');
   }
 }
diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Type/SelectionPluginManager.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Type/SelectionPluginManager.php
index af91a2d..db3bd47 100644
--- a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Type/SelectionPluginManager.php
+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Type/SelectionPluginManager.php
@@ -22,9 +22,12 @@ class SelectionPluginManager extends PluginManagerBase {
 
   /**
    * Constructs a SelectionPluginManager object.
+   *
+   * @param array $namespaces
+   *   An array of paths keyed by it's corresponding namespaces.
    */
-  public function __construct() {
-    $this->baseDiscovery = new AlterDecorator(new AnnotatedClassDiscovery('entity_reference', 'selection'), 'entity_reference_selection');
+  public function __construct($namespaces) {
+    $this->baseDiscovery = new AlterDecorator(new AnnotatedClassDiscovery('entity_reference', 'selection', $namespaces), 'entity_reference_selection');
     $this->discovery = new CacheDecorator($this->baseDiscovery, 'entity_reference_selection');
     $this->factory = new ReflectionFactory($this);
   }
diff --git a/core/modules/field/lib/Drupal/field/FieldBundle.php b/core/modules/field/lib/Drupal/field/FieldBundle.php
index 7fd0ddf..b491a9c 100644
--- a/core/modules/field/lib/Drupal/field/FieldBundle.php
+++ b/core/modules/field/lib/Drupal/field/FieldBundle.php
@@ -20,8 +20,10 @@ class FieldBundle extends Bundle {
    */
   public function build(ContainerBuilder $container) {
     // Register the plugin managers for our plugin types with the dependency injection container.
-    $container->register('plugin.manager.field.widget', 'Drupal\field\Plugin\Type\Widget\WidgetPluginManager');
-    $container->register('plugin.manager.field.formatter', 'Drupal\field\Plugin\Type\Formatter\FormatterPluginManager');
+    $container->register('plugin.manager.field.widget', 'Drupal\field\Plugin\Type\Widget\WidgetPluginManager')
+      ->addArgument('%container.namespaces%');
+    $container->register('plugin.manager.field.formatter', 'Drupal\field\Plugin\Type\Formatter\FormatterPluginManager')
+      ->addArgument('%container.namespaces%');
   }
 
 }
diff --git a/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php b/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php
index c935c44..424f272 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php
@@ -30,9 +30,12 @@ class FormatterPluginManager extends PluginManagerBase {
 
   /**
    * Constructs a FormatterPluginManager object.
+   *
+   * @param array $namespaces
+   *   An array of paths keyed by it's corresponding namespaces.
    */
-  public function __construct() {
-    $this->discovery = new AnnotatedClassDiscovery('field', 'formatter');
+  public function __construct($namespaces) {
+    $this->discovery = new AnnotatedClassDiscovery('field', 'formatter', $namespaces);
     $this->discovery = new FormatterLegacyDiscoveryDecorator($this->discovery);
     $this->discovery = new ProcessDecorator($this->discovery, array($this, 'processDefinition'));
     $this->discovery = new AlterDecorator($this->discovery, 'field_formatter_info');
diff --git a/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php b/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php
index 2d2c6e2..7014acc 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php
@@ -31,9 +31,12 @@ class WidgetPluginManager extends PluginManagerBase {
 
   /**
    * Constructs a WidgetPluginManager object.
+   *
+   * @param array $namespaces
+   *   An array of paths keyed by it's corresponding namespaces.
    */
-  public function __construct() {
-    $this->discovery = new AnnotatedClassDiscovery('field', 'widget');
+  public function __construct($namespaces) {
+    $this->discovery = new AnnotatedClassDiscovery('field', 'widget', $namespaces);
     $this->discovery = new WidgetLegacyDiscoveryDecorator($this->discovery);
     $this->discovery = new ProcessDecorator($this->discovery, array($this, 'processDefinition'));
     $this->discovery = new AlterDecorator($this->discovery, 'field_widget_info');
diff --git a/core/modules/layout/lib/Drupal/layout/LayoutBundle.php b/core/modules/layout/lib/Drupal/layout/LayoutBundle.php
index 59b8513..c639da9 100644
--- a/core/modules/layout/lib/Drupal/layout/LayoutBundle.php
+++ b/core/modules/layout/lib/Drupal/layout/LayoutBundle.php
@@ -20,6 +20,7 @@ class LayoutBundle extends Bundle {
    */
   public function build(ContainerBuilder $container) {
     // Register the LayoutManager class with the dependency injection container.
-    $container->register('plugin.manager.layout', 'Drupal\layout\Plugin\Type\LayoutManager');
+    $container->register('plugin.manager.layout', 'Drupal\layout\Plugin\Type\LayoutManager')
+      ->addArgument('%container.namespaces%');
   }
 }
diff --git a/core/modules/layout/lib/Drupal/layout/Plugin/Type/LayoutManager.php b/core/modules/layout/lib/Drupal/layout/Plugin/Type/LayoutManager.php
index 191a317..0dcb14c 100644
--- a/core/modules/layout/lib/Drupal/layout/Plugin/Type/LayoutManager.php
+++ b/core/modules/layout/lib/Drupal/layout/Plugin/Type/LayoutManager.php
@@ -24,10 +24,13 @@ class LayoutManager extends PluginManagerBase {
 
   /**
    * Overrides Drupal\Component\Plugin\PluginManagerBase::__construct().
+   *
+   * @param array $namespaces
+   *   An array of paths keyed by it's corresponding namespaces.
    */
-  public function __construct() {
+  public function __construct($namespaces) {
     // Create layout plugin derivatives from declaratively defined layouts.
-    $this->discovery = new AnnotatedClassDiscovery('layout', 'layout');
+    $this->discovery = new AnnotatedClassDiscovery('layout', 'layout', $namespaces);
     $this->discovery = new DerivativeDiscoveryDecorator($this->discovery);
     $this->discovery = new ProcessDecorator($this->discovery, array($this, 'processDefinition'));
 
diff --git a/core/modules/node/lib/Drupal/node/Tests/Condition/NodeConditionTest.php b/core/modules/node/lib/Drupal/node/Tests/Condition/NodeConditionTest.php
index addc5c0..a8058f7 100644
--- a/core/modules/node/lib/Drupal/node/Tests/Condition/NodeConditionTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/Condition/NodeConditionTest.php
@@ -38,7 +38,7 @@ protected function setUp() {
    * Tests conditions.
    */
   function testConditions() {
-    $manager = new ConditionManager();
+    $manager = new ConditionManager($this->container->getParameter('container.namespaces'));
 
     // Get some nodes of various types to check against.
     $page = entity_create('node', array('type' => 'page', 'title' => $this->randomName()));
diff --git a/core/modules/rest/lib/Drupal/rest/Plugin/Type/ResourcePluginManager.php b/core/modules/rest/lib/Drupal/rest/Plugin/Type/ResourcePluginManager.php
index 1bafc06..ec5e31e 100644
--- a/core/modules/rest/lib/Drupal/rest/Plugin/Type/ResourcePluginManager.php
+++ b/core/modules/rest/lib/Drupal/rest/Plugin/Type/ResourcePluginManager.php
@@ -19,10 +19,13 @@ class ResourcePluginManager extends PluginManagerBase {
 
   /**
    * Overrides Drupal\Component\Plugin\PluginManagerBase::__construct().
+   *
+   * @param array $namespaces
+   *   An array of paths keyed by it's corresponding namespaces.
    */
-  public function __construct() {
+  public function __construct($namespaces) {
     // Create resource plugin derivatives from declaratively defined resources.
-    $this->discovery = new DerivativeDiscoveryDecorator(new AnnotatedClassDiscovery('rest', 'resource'));
+    $this->discovery = new DerivativeDiscoveryDecorator(new AnnotatedClassDiscovery('rest', 'resource', $namespaces));
     $this->factory = new ReflectionFactory($this->discovery);
   }
 
diff --git a/core/modules/rest/lib/Drupal/rest/RestBundle.php b/core/modules/rest/lib/Drupal/rest/RestBundle.php
index 9d9360f..49a1169 100644
--- a/core/modules/rest/lib/Drupal/rest/RestBundle.php
+++ b/core/modules/rest/lib/Drupal/rest/RestBundle.php
@@ -22,7 +22,8 @@ class RestBundle extends Bundle {
   public function build(ContainerBuilder $container) {
     // Register the resource manager class with the dependency injection
     // container.
-    $container->register('plugin.manager.rest', 'Drupal\rest\Plugin\Type\ResourcePluginManager');
+    $container->register('plugin.manager.rest', 'Drupal\rest\Plugin\Type\ResourcePluginManager')
+      ->addArgument('%container.namespaces%');
 
     $container->register('rest.route_subscriber', 'Drupal\rest\EventSubscriber\RouteSubscriber')
       ->addArgument(new Reference('plugin.manager.rest'))
diff --git a/core/modules/system/lib/Drupal/system/Plugin/PluginUIBase.php b/core/modules/system/lib/Drupal/system/Plugin/PluginUIBase.php
index f2c312d..dd890fd 100644
--- a/core/modules/system/lib/Drupal/system/Plugin/PluginUIBase.php
+++ b/core/modules/system/lib/Drupal/system/Plugin/PluginUIBase.php
@@ -22,7 +22,13 @@
    */
   public function form($form, &$form_state) {
     $plugin_definition = $this->getDefinition();
-    $manager = new $plugin_definition['manager']();
+    // @todo Find out how to let the manager be injected into the class.
+    if (class_exists($plugin_definition['manager'])) {
+      $manager = new $plugin_definition['manager']();
+    }
+    else {
+      $manager = drupal_container()->get($plugin_definition['manager']);
+    }
     $plugins = $manager->getDefinitions();
 
     $rows = array();
diff --git a/core/modules/system/lib/Drupal/system/Plugin/Type/PluginUIManager.php b/core/modules/system/lib/Drupal/system/Plugin/Type/PluginUIManager.php
index 069f2b2..dd7fca3 100644
--- a/core/modules/system/lib/Drupal/system/Plugin/Type/PluginUIManager.php
+++ b/core/modules/system/lib/Drupal/system/Plugin/Type/PluginUIManager.php
@@ -23,9 +23,12 @@ class PluginUIManager extends PluginManagerBase {
 
   /**
    * Constructs a \Drupal\system\Plugin\Type\PluginUIManager object.
+   *
+   * @param array $namespaces
+   *   An array of paths keyed by it's corresponding namespaces.
    */
-  public function __construct() {
-    $this->discovery = new AnnotatedClassDiscovery('system', 'plugin_ui');
+  public function __construct($namespaces) {
+    $this->discovery = new AnnotatedClassDiscovery('system', 'plugin_ui', $namespaces);
     $this->discovery = new DerivativeDiscoveryDecorator($this->discovery);
     $this->discovery = new AlterDecorator($this->discovery, 'plugin_ui');
     $this->discovery = new CacheDecorator($this->discovery, 'plugin_ui');
diff --git a/core/modules/system/lib/Drupal/system/SystemBundle.php b/core/modules/system/lib/Drupal/system/SystemBundle.php
index 8662169..2b937c0 100644
--- a/core/modules/system/lib/Drupal/system/SystemBundle.php
+++ b/core/modules/system/lib/Drupal/system/SystemBundle.php
@@ -24,6 +24,7 @@ public function build(ContainerBuilder $container) {
 
     // Register the various system plugin manager classes with the dependency
     // injection container.
-    $container->register('plugin.manager.system.plugin_ui', 'Drupal\system\Plugin\Type\PluginUIManager');
+    $container->register('plugin.manager.system.plugin_ui', 'Drupal\system\Plugin\Type\PluginUIManager')
+      ->addArgument('%container.namespaces%');
   }
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/AnnotatedClassDiscoveryTest.php b/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/AnnotatedClassDiscoveryTest.php
index 5f395e1..11ae638 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/AnnotatedClassDiscoveryTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/AnnotatedClassDiscoveryTest.php
@@ -53,8 +53,24 @@ public function setUp() {
         'class' => 'Drupal\plugin_test\Plugin\plugin_test\fruit\Orange',
       ),
     );
-    $this->discovery = new AnnotatedClassDiscovery('plugin_test', 'fruit');
-    $this->emptyDiscovery = new AnnotatedClassDiscovery('non_existing_module', 'non_existing_plugin_type');
+    $namespaces = array('Drupal\plugin_test' => DRUPAL_ROOT . '/core/modules/system/tests/modules/plugin_test/lib');
+    $this->discovery = new AnnotatedClassDiscovery('plugin_test', 'fruit', $namespaces);
+    $this->emptyDiscovery = new AnnotatedClassDiscovery('non_existing_module', 'non_existing_plugin_type', $namespaces);
   }
+
+  /**
+   * Tests AnnotatedClassDiscovery without root namespaces.
+   */
+  public function testAnnotatedClassDiscoveryWithPluginNamespaces() {
+    $plugin_namespaces = array();
+    $plugin_namespaces['Drupal\\plugin_test\\Plugin\\plugin_test\\fruit'] = array(DRUPAL_ROOT . '/core/modules/system/tests/modules/plugin_test/lib');
+    $this->discovery = new AnnotatedClassDiscovery('plugin_test', 'fruit', array(), $plugin_namespaces);
+    $plugin_namespaces = array();
+    $plugin_namespaces['Drupal\\plugin_test\\Plugin\\non_existing_module\\non_existing_plugin_type'] = array(DRUPAL_ROOT . '/core/modules/system/tests/modules/plugin_test/lib');
+    $this->emptyDiscovery = new AnnotatedClassDiscovery('non_existing_module', 'non_existing_plugin_type', array(), $plugin_namespaces);
+
+    $this->testDiscoveryInterface();
+  }
+
 }
 
diff --git a/core/modules/system/tests/modules/condition_test/lib/Drupal/condition_test/FormController.php b/core/modules/system/tests/modules/condition_test/lib/Drupal/condition_test/FormController.php
index 35a5325..03b918e 100644
--- a/core/modules/system/tests/modules/condition_test/lib/Drupal/condition_test/FormController.php
+++ b/core/modules/system/tests/modules/condition_test/lib/Drupal/condition_test/FormController.php
@@ -33,7 +33,7 @@ public function getFormID() {
    * Provides a simple method the router can fire in order to invoke this form.
    */
   public function getForm() {
-    $manager = new ConditionManager();
+    $manager = new ConditionManager(drupal_container()->getParameter('container.namespaces'));
     $this->condition = $manager->createInstance('node_type');
     return drupal_get_form($this);
   }
diff --git a/core/modules/tour/lib/Drupal/tour/TourBundle.php b/core/modules/tour/lib/Drupal/tour/TourBundle.php
index 337a672..11c3c61 100644
--- a/core/modules/tour/lib/Drupal/tour/TourBundle.php
+++ b/core/modules/tour/lib/Drupal/tour/TourBundle.php
@@ -21,6 +21,7 @@ class TourBundle extends Bundle {
   public function build(ContainerBuilder $container) {
     // Register the plugin manager for our plugin type with the dependency
     // injection container.
-    $container->register('plugin.manager.tour', 'Drupal\tour\TourManager');
+    $container->register('plugin.manager.tour', 'Drupal\tour\TourManager')
+      ->addArgument('%container.namespaces%');
   }
 }
diff --git a/core/modules/tour/lib/Drupal/tour/TourManager.php b/core/modules/tour/lib/Drupal/tour/TourManager.php
index ee44c9b..0123fa9 100644
--- a/core/modules/tour/lib/Drupal/tour/TourManager.php
+++ b/core/modules/tour/lib/Drupal/tour/TourManager.php
@@ -20,10 +20,12 @@ class TourManager extends PluginManagerBase {
 
   /**
    * Overrides \Drupal\Component\Plugin\PluginManagerBase::__construct().
+   *
+   * @param array $namespaces
+   *   An array of paths keyed by it's corresponding namespaces.
    */
-  public function __construct() {
-    $this->discovery = new AnnotatedClassDiscovery('tour', 'tip');
-    $this->discovery = new ProcessDecorator($this->discovery, array($this, 'processDefinition'));
+  public function __construct(array $namespaces) {
+    $this->discovery = new AnnotatedClassDiscovery('tour', 'tip', $namespaces);
     $this->discovery = new CacheDecorator($this->discovery, 'tour');
     $this->factory = new DefaultFactory($this->discovery);
   }
@@ -37,17 +39,4 @@ public function createInstance($plugin_id, array $configuration = array(), TipsB
     $plugin_class = DefaultFactory::getPluginClass($plugin_id, $this->discovery);
     return new $plugin_class($configuration, $plugin_id, $this->discovery, $bag);
   }
-
-  /**
-   * Overrides \Drupal\Component\Plugin\PluginManagerBase::processDefinition().
-   */
-  public function processDefinition(&$definition, $plugin_id) {
-    parent::processDefinition($definition, $plugin_id);
-
-    // @todo Remove this check once http://drupal.org/node/1780396 is resolved.
-    if (!module_exists($definition['module'])) {
-      $definition = NULL;
-      return;
-    }
-  }
 }
diff --git a/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php b/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php
index 14fc64a..56633f8 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php
@@ -22,9 +22,14 @@ class ViewsPluginManager extends PluginManagerBase {
 
   /**
    * Constructs a ViewsPluginManager object.
+   *
+   * @param string $type
+   *   The plugin type, for example filter.
+   * @param array $namespaces
+   *   An array of paths keyed by it's corresponding namespaces.
    */
-  public function __construct($type) {
-    $this->discovery = new AnnotatedClassDiscovery('views', $type);
+  public function __construct($type, array $namespaces = array()) {
+    $this->discovery = new AnnotatedClassDiscovery('views', $type, $namespaces);
     $this->discovery = new DerivativeDiscoveryDecorator($this->discovery);
     $this->discovery = new ProcessDecorator($this->discovery, array($this, 'processDefinition'));
     $this->discovery = new AlterDecorator($this->discovery, 'views_plugins_' . $type);
diff --git a/core/modules/views/lib/Drupal/views/ViewsBundle.php b/core/modules/views/lib/Drupal/views/ViewsBundle.php
index ac035cb..0b18d3f 100644
--- a/core/modules/views/lib/Drupal/views/ViewsBundle.php
+++ b/core/modules/views/lib/Drupal/views/ViewsBundle.php
@@ -23,7 +23,8 @@ class ViewsBundle extends Bundle {
   public function build(ContainerBuilder $container) {
     foreach (ViewExecutable::getPluginTypes() as $type) {
       $container->register("plugin.manager.views.$type", 'Drupal\views\Plugin\ViewsPluginManager')
-        ->addArgument($type);
+        ->addArgument($type)
+        ->addArgument('%container.namespaces%');
     }
 
     $container
