ast: Fix problem finding overlap between regions that straddle a discontinuity