Fix missing checks in Polygon intersection tests added in previous commit. Add unit tests.