diff --git a/core/modules/entity/lib/Drupal/entity/EntityFieldQuery.php b/core/modules/entity/lib/Drupal/entity/EntityFieldQuery.php
index 9c1db74..8ea8a6a 100644
--- a/core/modules/entity/lib/Drupal/entity/EntityFieldQuery.php
+++ b/core/modules/entity/lib/Drupal/entity/EntityFieldQuery.php
@@ -813,18 +813,24 @@ class EntityFieldQuery {
     // record per entity is returned.
     if (!empty($entity_info['data table'])) {
       $data_table = $entity_info['data table'];
+      $data_table_schema = drupal_get_schema($data_table);
       $select_query->innerJoin($data_table, NULL, "$data_table.$sql_field = $base_table.$sql_field");
       $select_query->distinct(TRUE);
-      $property_table = $data_table;
     }
     else {
-      $property_table = $base_table;
+      $data_table_schema = array();
     }
 
     // Process the property conditions.
     foreach ($this->propertyConditions as $property_condition) {
       $column = $property_condition['column'];
-      $this->addCondition($select_query, "$property_table.$column", $property_condition);
+      // @todo Property conditions should always apply to the data table (if
+      // available), however UUIDs are used in load conditions and thus treated
+      // as properties, instead of being set as entity conditions. Remove this
+      // once we can reliably distinguish between properties and metadata living
+      // on the base table.
+      $table = !empty($data_table_schema['fields'][$column]) ? $data_table : $base_table;
+      $this->addCondition($select_query, "$table.$column", $property_condition);
     }
 
     // Process the six possible entity condition.
@@ -896,7 +902,8 @@ class EntityFieldQuery {
       }
       elseif ($order['type'] == 'property') {
         $specifier = $order['specifier'];
-        $select_query->orderBy("$property_table.$specifier", $order['direction']);
+        $table = !empty($data_table_schema['fields'][$specifier]) ? $data_table : $base_table;
+        $select_query->orderBy("$table.$specifier", $order['direction']);
       }
     }
 
