Sort selections and check for overlapps.