How to synchronize these two sets of curves in order to loft?

I have two sets of curves—one on the outside and another on the inside. They all together form in a circle.

The issue is when you look at the listed order of the two sets, they are not synced up. I’ve attached an image of what I’d like to do. Basically it is to loft the outside curves to their complimentary inside curve. This should result in 816 shelf-like surfaces.

What would be the best means of syncing these curves together to create a proper loft?

11_capture_01 (1.7 MB)

First of all, I would rework the script which creates the curves. But here’s how to fix it. (1.7 MB)

Thank you! I agree my approach to initially creating the curves is not the most elegant. Can you pleaase explain the process with the closest point and list item?

I created a Point on every curve. Closest Point gives to every Point on the inner circle, the index of the Point on the outer circle. List item uses this index to list the outer curves in the right order. So when merging them together every branch includes the two related curves.