Fixes wildcard replacement for generic types that dont have the same shape

for e.g. When SomeType<WildcardType> maps to Wildcard

closes #168