Fix ty_trait variance inference bug