Convert checkStaticLinkingToStubLibraries to use module proxy.

Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: Id776727a431f2ce8fd4c7b352dc0bd282ac57f90
diff --git a/android/base_module_context.go b/android/base_module_context.go
index 1f89dea..06819d6 100644
--- a/android/base_module_context.go
+++ b/android/base_module_context.go
@@ -288,7 +288,7 @@
 	return b.bp.OtherModuleReverseDependencyVariantExists(name)
 }
 func (b *baseModuleContext) OtherModuleType(m blueprint.Module) string {
-	return b.bp.OtherModuleType(m)
+	return b.bp.OtherModuleType(getWrappedModule(m))
 }
 
 func (b *baseModuleContext) otherModuleProvider(m blueprint.Module, provider blueprint.AnyProviderKey) (any, bool) {