Now correctly honoring the segment_id flag where appropriate