diff --git a/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php b/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php
index 8c1f51d..881c473 100644
--- a/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php
+++ b/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php
@@ -316,6 +316,7 @@ protected function getNormalizedIndexes(array $spec) {
         // Get the name of the field from the index specification.
         $field_name = is_array($index_field) ? $index_field[0] : $index_field;
         // Check whether the field is defined in the table specification.
+        assert('isset($spec[\'fields\'][$field_name])', "MySQL needs the '$field_name' field specification in order to normalize the '$index_name' index");
         if (isset($spec['fields'][$field_name])) {
           // Get the MySQL type from the processed field.
           $mysql_field = $this->processField($spec['fields'][$field_name]);
@@ -327,9 +328,6 @@ protected function getNormalizedIndexes(array $spec) {
             }
           }
         }
-        else {
-          throw new SchemaException("MySQL needs the '$field_name' field specification in order to normalize the '$index_name' index");
-        }
       }
     }
     return $indexes;
