Fix noticeable artefact in polyline and beizer curve rendering.