diff --git a/core/core.services.yml b/core/core.services.yml
index ba3be7f..b48f1a8 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -304,7 +304,7 @@ services:
       - [setContainer, ['@service_container']]
   entity.query.config:
     class: Drupal\Core\Config\Entity\Query\QueryFactory
-    arguments: ['@config.storage']
+    arguments: ['@config.storage', '@config.factory']
   entity.query.sql:
     class: Drupal\Core\Entity\Query\Sql\QueryFactory
     arguments: ['@database']
diff --git a/core/lib/Drupal/Core/Config/Entity/Query/Query.php b/core/lib/Drupal/Core/Config/Entity/Query/Query.php
index 8789445..b398f83 100644
--- a/core/lib/Drupal/Core/Config/Entity/Query/Query.php
+++ b/core/lib/Drupal/Core/Config/Entity/Query/Query.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\Core\Config\Entity\Query;
 
+use Drupal\Core\Config\ConfigFactory;
 use Drupal\Core\Config\StorageInterface;
 use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\Core\Entity\Query\QueryBase;
@@ -32,6 +33,13 @@ class Query extends QueryBase implements QueryInterface {
   protected $configStorage;
 
   /**
+   * The config factory used by the config entity query.
+   *
+   * @var \Drupal\Core\Config\ConfigFactory;
+   */
+  protected $configFactory;
+
+  /**
    * Constructs a Query object.
    *
    * @param string $entity_type
@@ -46,10 +54,11 @@ class Query extends QueryBase implements QueryInterface {
    * @param array $namespaces
    *   List of potential namespaces of the classes belonging to this query.
    */
-  function __construct($entity_type, $conjunction, EntityManagerInterface $entity_manager, StorageInterface $config_storage, array $namespaces) {
+  function __construct($entity_type, $conjunction, EntityManagerInterface $entity_manager, StorageInterface $config_storage, ConfigFactory $config_factory, array $namespaces) {
     parent::__construct($entity_type, $conjunction, $namespaces);
     $this->entityManager = $entity_manager;
     $this->configStorage = $config_storage;
+    $this->configFactory = $config_factory;
   }
 
   /**
@@ -81,8 +90,9 @@ public function execute() {
     $prefix_length = strlen($prefix);
     $names = $this->configStorage->listAll($prefix);
     $configs = array();
-    foreach ($names as $name) {
-      $configs[substr($name, $prefix_length)] = \Drupal::config($name)->get();
+    $config_objects = $this->configFactory->loadMultiple($names);
+    foreach ($config_objects as $config) {
+      $configs[substr($config->getName(), $prefix_length)] = $config->get();
     }
 
     $result = $this->condition->compile($configs);
diff --git a/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php b/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php
index 5b29a6a..1c53b7f 100644
--- a/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php
+++ b/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\Core\Config\Entity\Query;
 
+use Drupal\Core\Config\ConfigFactory;
 use Drupal\Core\Config\StorageInterface;
 use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\Core\Entity\Query\QueryBase;
@@ -26,6 +27,13 @@ class QueryFactory implements QueryFactoryInterface {
   protected $configStorage;
 
   /**
+   * The config factory used by the config entity query.
+   *
+   * @var \Drupal\Core\Config\ConfigFactory;
+   */
+  protected $configFactory;
+
+  /**
    * The namespace of this class, the parent class etc.
    *
    * @var array
@@ -37,9 +45,12 @@ class QueryFactory implements QueryFactoryInterface {
    *
    * @param \Drupal\Core\Config\StorageInterface $config_storage
    *   The config storage used by the config entity query.
+   * @param \Drupal\Core\Config\ConfigFactory $config_factory
+   *   The config storage used by the config entity query.
    */
-  public function __construct(StorageInterface $config_storage) {
+  public function __construct(StorageInterface $config_storage, ConfigFactory $config_factory) {
     $this->configStorage = $config_storage;
+    $this->configFactory = $config_factory;
     $this->namespaces = QueryBase::getNamespaces($this);
   }
 
@@ -47,7 +58,7 @@ public function __construct(StorageInterface $config_storage) {
    * {@inheritdoc}
    */
   public function get($entity_type, $conjunction, EntityManagerInterface $entity_manager) {
-    return new Query($entity_type, $conjunction, $entity_manager, $this->configStorage, $this->namespaces);
+    return new Query($entity_type, $conjunction, $entity_manager, $this->configStorage, $this->configFactory, $this->namespaces);
   }
 
   /**
