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

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

closes #168
Merge branch 'rel-0.6'
latest implementation of PR but still a few things to resolve