diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php b/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php
index 2c6559457bf293491470b8859afb684a4d3139fe..6b6b43eda67377e221fd63f398fe1c43e19a8316 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php
@@ -1044,9 +1044,11 @@ function add_groupby($clause) {
   /**
    * Returns the alias for the given field added to $table.
    *
+   * @access protected
+   *
    * @see views_plugin_query_default::add_field()
    */
-  function get_field_alias($table_alias, $field) {
+  protected function getFieldAlias($table_alias, $field) {
     return isset($this->field_aliases[$table_alias][$field]) ? $this->field_aliases[$table_alias][$field] : FALSE;
   }
 
@@ -1600,7 +1602,7 @@ function loadEntities(&$results) {
       $entity_type = $table['entity_type'];
       $info = entity_get_info($entity_type);
       $id_key = empty($table['revision']) ? $info['entity_keys']['id'] : $info['entity_keys']['revision'];
-      $id_alias = $this->get_field_alias($table_alias, $id_key);
+      $id_alias = $this->getFieldAlias($table_alias, $id_key);
 
       foreach ($results as $index => $result) {
         // Store the entity id if it was found.