Fully resolve types when flattening intersections and unions