Use the right class loader for ResolvedMethodAccessTest.

The method_id is relative to the current class and its dex cache.

Test: test.py
Bug: 199246839
Change-Id: Ic9b29bda22d2dc1781e3e2daac57f55ba69c7e2d
diff --git a/runtime/mirror/class-inl.h b/runtime/mirror/class-inl.h
index 7a56d13..3295364 100644
--- a/runtime/mirror/class-inl.h
+++ b/runtime/mirror/class-inl.h
@@ -504,7 +504,7 @@
     ObjPtr<Class> dex_access_to = Runtime::Current()->GetClassLinker()->LookupResolvedType(
         class_idx,
         dex_cache,
-        access_to->GetClassLoader());
+        GetClassLoader());
     DCHECK(dex_access_to != nullptr)
         << " Could not resolve " << dex_cache->GetDexFile()->StringByTypeIdx(class_idx)
         << " when checking access to " << method->PrettyMethod() << " from " << PrettyDescriptor();