diff --git a/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php b/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php
index de48ba1..77f6a33 100644
--- a/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php
+++ b/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php
@@ -195,8 +195,8 @@ public function addField($field, $type, $langcode) {
           $next = $specifiers[$key + 1];
           // Is this a delta wildcard?
           if ($next == '?') {
+            $key++;
             if ($key < $count) {
-              $key++;
               $next = $specifiers[$key + 1];
             }
             else {
