am 9a783d6a: Fix FindDeclaredVirtualMethod(DexCache...) for miranda methods

* commit '9a783d6a0cb437fc0d9ffcc84502912f3d1cb73b':
  Fix FindDeclaredVirtualMethod(DexCache...) for miranda methods
diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc
index 5b8eb82..c10e8b1 100644
--- a/runtime/mirror/class.cc
+++ b/runtime/mirror/class.cc
@@ -499,7 +499,9 @@
   if (GetDexCache() == dex_cache) {
     for (size_t i = 0; i < NumVirtualMethods(); ++i) {
       ArtMethod* method = GetVirtualMethod(i);
-      if (method->GetDexMethodIndex() == dex_method_idx) {
+      if (method->GetDexMethodIndex() == dex_method_idx &&
+          // A miranda method may have a different DexCache.
+          method->GetDexCache() == dex_cache) {
         return method;
       }
     }