Handle self-intersection.