Find a better strategy to avoid duplicate solutions in PathItem#getIntersections().

Closes #197.