It seems that the overlaps are removed before calling remove_overlap. I've tried "Atlantic City of Georgia" and it returns "Atlantic City" and "Georgia" before or after I call remove_overlap, for "South Korea United States" it returns "South Korea" and "United States", and for "United States of America" it returns "United States"; these results are before calling remove_overlap.
It seems that the overlaps are removed before calling remove_overlap. I've tried "Atlantic City of Georgia" and it returns "Atlantic City" and "Georgia" before or after I call remove_overlap, for "South Korea United States" it returns "South Korea" and "United States", and for "United States of America" it returns "United States"; these results are before calling remove_overlap.