curves can be reoredered within the original list based on a new flag in the curve key
completed code for reordering curves within the original list of curve tree
completed reordering the curves and using the reordered list for intersection