(fix_overlays_in_range): New function.