Handle generic wildcards

Related to #722