diff --git a/core/modules/entity/lib/Drupal/entity/EntityFieldQuery.php b/core/modules/entity/lib/Drupal/entity/EntityFieldQuery.php
index 752d071..94fd2a7 100644
--- a/core/modules/entity/lib/Drupal/entity/EntityFieldQuery.php
+++ b/core/modules/entity/lib/Drupal/entity/EntityFieldQuery.php
@@ -571,12 +571,13 @@ class EntityFieldQuery {
    * @return Drupal\entity\EntityFieldQuery
    *   The called object.
    */
-  public function propertyOrderBy($column, $direction = 'ASC', $langcode_group = NULL) {
+  public function propertyOrderBy($column, $direction = 'ASC', $langcode_group = 0) {
+    $this->properties[$langcode_group][$column] = $column;
     $this->order[] = array(
       'type' => 'property',
       'specifier' => $column,
       'direction' => $direction,
-      'langcode_group' => !empty($langcode_group) ? $langcode_group : 0,
+      'langcode_group' => $langcode_group,
     );
     return $this;
   }
@@ -862,8 +863,12 @@ class EntityFieldQuery {
     $select_query->addExpression(':entity_type', 'entity_type', array(':entity_type' => $entity_type));
     $sql_field = $entity_info['entity keys']['id'];
 
+    // If a data table is defined we need to join it and make sure that only one
+    // record per entity is returned.
+    $this->joinPropertyData($select_query, $entity_type, $base_table);
+
     // Process the property conditions.
-    $this->addPropertyConditions($select_query, $entity_type, $base_table);
+    $this->addPropertyConditions($select_query, $entity_type);
 
     // Process the six possible entity condition.
     // The id field is always present in entity keys.
@@ -1033,22 +1038,12 @@ class EntityFieldQuery {
    *   The SelectQuery the conditions should be applied to.
    * @param $entity_type
    *   The entity type the query applies to.
-   * @param $base_table
-   *   The name of the base table to be used for joins.
-   * @param $base_id_key
-   *   The primary id column name to use to join on the base table.
    */
-  public function addPropertyConditions(Select $select_query, $entity_type, $base_table, $base_id_key = NULL) {
+  public function addPropertyConditions(Select $select_query, $entity_type) {
     $entity_info = entity_get_info($entity_type);
     $entity_base_table = $entity_info['base table'];
     list($data_table, $data_table_schema) = $this->getPropertyDataSchema($entity_type);
 
-    // If a data table is defined we need to join it and make sure that only one
-    // record per entity is returned.
-    if (!empty($data_table)) {
-      $this->joinPropertyData($select_query, $entity_type, $base_table, $base_id_key);
-    }
-
     foreach ($this->propertyConditions as $property_condition) {
       $column = $property_condition['column'];
       // @todo Property conditions should always apply to the data table (if
@@ -1080,6 +1075,39 @@ class EntityFieldQuery {
   }
 
   /**
+   * Joins the needed data tables based on the specified property conditions.
+   *
+   * @param SelectQuery $select_query
+   *   A SelectQuery containing at least one table as specified by $base_table.
+   * @param $entity_type
+   *   The entity type the query applies to.
+   * @param $base_table
+   *   The name of the base table to join on.
+   * @param $base_id_key
+   *   The primary id column name to use to join on the base table.
+   */
+  public function joinPropertyData(Select $select_query, $entity_type, $base_table, $base_id_key = NULL) {
+    list($data_table, $data_table_schema) = $this->getPropertyDataSchema($entity_type);
+
+    // If we have no data table there are no property meta conditions to handle.
+    if (!empty($data_table)) {
+      $entity_info = entity_get_info($entity_type);
+      $id_key = $entity_info['entity keys']['id'];
+      $base_id_key = !empty($base_id_key) ? $base_id_key : $id_key;
+
+      foreach ($this->properties as $key => $property) {
+        // Every property needs a new join on the data table.
+        $table_alias = $data_table . '_' . $key;
+        $table_aliases[$key] = $table_alias;
+        $select_query->join($data_table, $table_alias, "$table_alias.$id_key = $base_table.$base_id_key");
+      }
+
+      // Ensure we return just one value.
+      $select_query->distinct();
+    }
+  }
+
+  /**
    * Returns the data table schema for the given entity type.
    *
    * @param $entity_type
@@ -1091,6 +1119,7 @@ class EntityFieldQuery {
    */
   protected function getPropertyDataSchema($entity_type) {
     $entity_info = entity_get_info($entity_type);
+
     if (!empty($entity_info['data table'])) {
       $data_table = $entity_info['data table'];
       $data_table_schema = drupal_get_schema($data_table);
@@ -1099,41 +1128,7 @@ class EntityFieldQuery {
       $data_table = FALSE;
       $data_table_schema = array();
     }
-    return array($data_table, $data_table_schema);
-  }
 
-  /**
-   * Joins the needed data tables based on the specified property conditions.
-   *
-   * @param SelectQuery $select_query
-   *   A SelectQuery containing at least one table as specified by $base_table.
-   * @param $entity_type
-   *   The entity type the query applies to.
-   * @param $base_table
-   *   The name of the base table to join on.
-   * @param $base_id_key
-   *   The primary id column name to use to join on the base table.
-   */
-  protected function joinPropertyData(Select $select_query, $entity_type, $base_table, $base_id_key = NULL) {
-    $entity_info = entity_get_info($entity_type);
-
-    // If we have no data table there are no property meta conditions to handle.
-    if (empty($entity_info['data table'])) {
-      return;
-    }
-
-    $data_table = $entity_info['data table'];
-    $id_key = $entity_info['entity keys']['id'];
-    $base_id_key = !empty($base_id_key) ? $base_id_key : $id_key;
-
-    foreach ($this->properties as $key => $property) {
-      // Every property needs a new join on the data table.
-      $table_alias = $data_table . '_' . $key;
-      $table_aliases[$key] = $table_alias;
-      $select_query->join($data_table, $table_alias, "$table_alias.$id_key = $base_table.$base_id_key");
-    }
-
-    // Ensure we return just one value.
-    $select_query->distinct();
+    return array($data_table, $data_table_schema);
   }
 }
diff --git a/core/modules/entity/lib/Drupal/entity/Tests/EntityTranslationTest.php b/core/modules/entity/lib/Drupal/entity/Tests/EntityTranslationTest.php
index 9520dfe..0950a2c 100644
--- a/core/modules/entity/lib/Drupal/entity/Tests/EntityTranslationTest.php
+++ b/core/modules/entity/lib/Drupal/entity/Tests/EntityTranslationTest.php
@@ -237,6 +237,7 @@ class EntityTranslationTest extends WebTestBase {
     // query.
     $query = new EntityFieldQuery();
     $query->entityCondition('entity_type', 'entity_test');
+    $query->entityCondition('langcode', $default_langcode);
     $query->propertyCondition('uid', $properties[$default_langcode]['uid'], NULL, 'original');
     $query->propertyCondition('name', $properties[$default_langcode]['name'], NULL, 'original');
     $query->propertyLanguageCondition($default_langcode, NULL, 'original');
@@ -253,6 +254,7 @@ class EntityTranslationTest extends WebTestBase {
     $entity->save();
     $query = new EntityFieldQuery();
     $query->entityCondition('entity_type', 'entity_test');
+    $query->entityCondition('langcode', $default_langcode);
     $query->propertyCondition('uid', $properties[$default_langcode]['uid'], NULL, 'original');
     $query->propertyCondition('name', $properties[$default_langcode]['name'], NULL, 'original');
     $query->propertyLanguageCondition($default_langcode, NULL, 'original');
diff --git a/core/modules/field/modules/field_sql_storage/field_sql_storage.module b/core/modules/field/modules/field_sql_storage/field_sql_storage.module
index bda5bb7..0de5b58 100644
--- a/core/modules/field/modules/field_sql_storage/field_sql_storage.module
+++ b/core/modules/field/modules/field_sql_storage/field_sql_storage.module
@@ -559,7 +559,8 @@ function field_sql_storage_field_storage_query(EntityFieldQuery $query) {
     $entity_type = $query->entityConditions['entity_type']['value'];
     $entity_base_table = _field_sql_storage_query_join_entity($select_query, $entity_type, $field_base_table);
     $query->entityConditions['entity_type']['operator'] = '=';
-    $query->addPropertyConditions($select_query, $entity_type, $field_base_table, 'entity_id');
+    $query->joinPropertyData($select_query, $entity_type, $field_base_table, 'entity_id');
+    $query->addPropertyConditions($select_query, $entity_type);
   }
 
   // The entity base keys require joining the entity base table.
@@ -580,7 +581,9 @@ function field_sql_storage_field_storage_query(EntityFieldQuery $query) {
       }
       if (empty($entity_schema)) {
         $entity_schema = drupal_get_schema($entity_base_table);
+        $entity_info = entity_get_info($entity_type);
       }
+      $key = !empty($entity_info['entity keys'][$key]) ? $entity_info['entity keys'][$key] : $key;
       if (!empty($entity_schema['fields'][$key])) {
         $table = $entity_base_table;
       }
