handle type parameters within unions/intersections for #612