As @filanek pointed out it is an issue with the Split Edges on cyclic curves… The last segment is inverted and I missed that when that segment gets joined with other segments then the curve order goes whacky.
I’ve updated the file here with a method that tracks the tangents, and if the tangent of the first point of a curve does not match the original then the curve gets inverted.
Please let me know if you have any more issues.
See original method from post by @stray here: