PolygonBatch::flush crash fix