Account for virtual call to abstract method on effectively final class

Bug: b/341537881
Change-Id: I8bf48a89d2e46caa37f6ea418694899db2aaeb81
diff --git a/src/main/java/com/android/tools/r8/horizontalclassmerging/policies/NoClassInitializerCycles.java b/src/main/java/com/android/tools/r8/horizontalclassmerging/policies/NoClassInitializerCycles.java
index 9addf2f..ec45f9d 100644
--- a/src/main/java/com/android/tools/r8/horizontalclassmerging/policies/NoClassInitializerCycles.java
+++ b/src/main/java/com/android/tools/r8/horizontalclassmerging/policies/NoClassInitializerCycles.java
@@ -551,12 +551,15 @@
                 .appInfo()
                 .resolveMethodOnClassHolderLegacy(rewrittenMethod)
                 .getResolutionPair();
-        if (resolvedMethod != null) {
-          if (!resolvedMethod.getHolder().isEffectivelyFinal(appView)) {
-            fail();
-          } else if (resolvedMethod.isProgramMethod()) {
-            enqueueMethod(resolvedMethod.asProgramMethod());
-          }
+        if (resolvedMethod == null) {
+          return;
+        }
+        if (!resolvedMethod.getHolder().isEffectivelyFinal(appView)) {
+          fail();
+          return;
+        }
+        if (resolvedMethod.isProgramMethod() && !resolvedMethod.getAccessFlags().isAbstract()) {
+          enqueueMethod(resolvedMethod.asProgramMethod());
         }
       }