Fix issue with verification check failure on erroneous classes.

Bug: 27924355

Change-Id: I7d680e7196aeb9e2e6ef54139634564e058174d7
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 7060593..d73f205 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -3786,7 +3786,9 @@
     while (old_status == mirror::Class::kStatusVerifying ||
         old_status == mirror::Class::kStatusVerifyingAtRuntime) {
       lock.WaitIgnoringInterrupts();
-      CHECK_GT(klass->GetStatus(), old_status);
+      CHECK(klass->IsErroneous() || (klass->GetStatus() > old_status))
+          << "Class '" << PrettyClass(klass.Get()) << "' performed an illegal verification state "
+          << "transition from " << old_status << " to " << klass->GetStatus();
       old_status = klass->GetStatus();
     }