Tidy up code in buildOffsetPolygons.