Fix some nasty bugs with generics when the base type has type parameters but the subtype does not.