Fix strokes sometimes being clipped as polygons

Fixes #1527.