and added a guard to IntersectVisitor which uses these new methods to prevent invalid segments being added.