Small change to the intersection method of a polygon

Fixes #7429