Allow repackaging in presence of passthrough methods

Bug: b/365784991
Change-Id: I14b67e08c9f9884c4f9bde825dc1e2b01293ed66
diff --git a/src/main/java/com/android/tools/r8/R8.java b/src/main/java/com/android/tools/r8/R8.java
index 5586e26..4b76e69 100644
--- a/src/main/java/com/android/tools/r8/R8.java
+++ b/src/main/java/com/android/tools/r8/R8.java
@@ -730,19 +730,19 @@
       // already have been leveraged.
       OptimizationInfoRemover.run(appView, executorService);
 
+      // Perform repackaging.
+      if (appView.hasLiveness()) {
+        if (options.isRepackagingEnabled()) {
+          new Repackaging(appView.withLiveness()).run(executorService, timing);
+        }
+        assert Repackaging.verifyIdentityRepackaging(appView.withLiveness(), executorService);
+      }
+
       GenericSignatureContextBuilder genericContextBuilderBeforeFinalMerging = null;
       if (appView.hasCfByteCodePassThroughMethods()) {
         LirConverter.rewriteLirWithLens(appView, timing, executorService);
         appView.clearCodeRewritings(executorService, timing);
       } else {
-        // Perform repackaging.
-        if (appView.hasLiveness()) {
-          if (options.isRepackagingEnabled()) {
-            new Repackaging(appView.withLiveness()).run(executorService, timing);
-          }
-          assert Repackaging.verifyIdentityRepackaging(appView.withLiveness(), executorService);
-        }
-
         // Rewrite LIR with lens to allow building IR from LIR in class mergers.
         LirConverter.rewriteLirWithLens(appView, timing, executorService);
         appView.clearCodeRewritings(executorService, timing);