[Polygon] Fix issue #10417 (signed integer overflow in scan_arbitrary)