diff --git a/core/lib/Drupal/Core/Config/Entity/Query/Condition.php b/core/lib/Drupal/Core/Config/Entity/Query/Condition.php
index e6d2d52..933ee13 100644
--- a/core/lib/Drupal/Core/Config/Entity/Query/Condition.php
+++ b/core/lib/Drupal/Core/Config/Entity/Query/Condition.php
@@ -130,10 +130,18 @@ protected function matchArray(array $condition, array $data, array $needs_matchi
     foreach ($candidates as $key) {
       if ($needs_matching) {
         if (is_array($data[$key])) {
-          $new_parents = $parents;
-          $new_parents[] = $key;
-          if ($this->matchArray($condition, $data[$key], $needs_matching, $new_parents)) {
-            return TRUE;
+          // Match a scalar automatically against an array.
+          if (is_scalar($condition['value']) && $condition['operator'] == '=') {
+            if ($this->matchBackwards($condition, $data[$key])) {
+              return TRUE;
+            }
+          }
+          else {
+            $new_parents = $parents;
+            $new_parents[] = $key;
+            if ($this->matchArray($condition, $data[$key], $needs_matching, $new_parents)) {
+              return TRUE;
+            }
           }
         }
       }
@@ -199,4 +207,23 @@ protected function match(array $condition, $value) {
     return $condition['operator'] === 'IS NULL';
   }
 
+ /**
+   * Match a scalar condition against an array.
+   *
+   * @param array $condition
+   *   The condition array as created by the condition() method.
+   * @param string $value
+   *   The value to match against.
+   *
+   * @return bool
+   *   TRUE when matches else FALSE.
+   */
+  protected function matchBackwards($condition, array $value) {
+    // We always want a case-insensitive match.
+    if (!is_bool($value)) {
+      $value = Unicode::strtolower($value);
+    }
+    return in_array($condition['value'], $value);
+  }
+
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/ConfigEntityQueryTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/ConfigEntityQueryTest.php
index d0d8b36..cc97627 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/ConfigEntityQueryTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/ConfigEntityQueryTest.php
@@ -436,6 +436,24 @@ protected function testSortRange() {
    * Tests dotted path matching.
    */
   protected function testDotted() {
+    // Create a new entity here so we don't interfere with the rest of the test
+    // methods.
+    $entity = entity_create('config_query_test', array(
+      'label' => $this->randomName(),
+      'id' => '6',
+      'array' => array(9),
+    ));
+    $this->entities[] = $entity;
+    $entity->enforceIsNew();
+    $entity->save();
+
+    // Try to match the value of a top-level array property.
+    $this->queryResults = $this->factory->get('config_query_test')
+      ->condition('array', 9)
+      ->execute();
+    $this->assertResults(array('6'));
+
+    // Continue with dotted path matching.
     $this->queryResults = $this->factory->get('config_query_test')
       ->condition('array.level1.*', 1)
       ->execute();
