added logic to remove deadlock when new intersection point is already in polygon.intersection_points array; corresponding test is also added