Split a set of curves and connect them

Hello everyone

There are two groups of curves, which are divided by the same program. One group of lines is ideal for me (see the first row of components). The other group of lines gets the wrong connection, and the “flip curve” component has an error. I can’t figure out why. Please help me to analyze (the line does not change at the beginning). PS: (English is not my native language, which is translated by software. I hope you can understand my expression.)

divide curve.gh (69.3 KB)

DivideCurve_RE.gh (74.9 KB)

Thank you for your help and help me develop my thinking.