Fix #620. More rigorous overlap check.