I see the points popping out for your new function (top curve in picture below):
xy = polyline2polygonTapered(xy, widthIn=0.49, widthOut=0.49)
If I use the original Nazca function everything looks fine (bottom curve):
xy = nd.util.polyline2polygon(xy, width=0.49)
Note I use the same width 0.49 everywhere.
Hence, you would have to check why your updated function behaves differently for the same parameter settings.
For the bottom curve for normal usage it is advised, and much simpler, to use the pcurve() interconnect and not the underlying polyline2polygon.