Rewrite types of GenericResolveReference to avoid unsoud OverlappingInstances