Relax is-simple-renaming check in lens rewriting of synthetic methods

Change-Id: I28b6bfec81cef73de88d52364372bc608000dfa0
diff --git a/src/main/java/com/android/tools/r8/synthesis/SyntheticMethodReference.java b/src/main/java/com/android/tools/r8/synthesis/SyntheticMethodReference.java
index 80e4e19..d1347f3 100644
--- a/src/main/java/com/android/tools/r8/synthesis/SyntheticMethodReference.java
+++ b/src/main/java/com/android/tools/r8/synthesis/SyntheticMethodReference.java
@@ -57,7 +57,8 @@
     DexMethod rewritten = lens.getRenamedMethodSignature(method);
     // If the reference has been non-trivially rewritten the compiler has changed it and it can no
     // longer be considered a synthetic. The context may or may not have changed.
-    if (method != rewritten && !lens.isSimpleRenaming(method, rewritten)) {
+    if (method.getHolderType() != rewritten.getHolderType()
+        && !lens.isSimpleRenaming(method, rewritten)) {
       // If the referenced item is rewritten, it should be moved to a non-internal synthetic holder
       // as the synthetic holder is no longer part of the synthetic collection.
       assert SyntheticNaming.verifyNotInternalSynthetic(rewritten.holder);