Contour brep outputs different length list than input

I’m working on a project that involves contouring a set of surfaces. Later in the process, these contours need to be matched up with the surfaces for another operation. The issue I’m having is when the contour does not land on the surface. I’m used to components outputting a list item for those type of cases. However, for the contour, it appears to just skip that index.

In the example below, the middle surface is too small so doesn’t get a contour line. The output list just skips from index {0,x} to {2,x} giving a list with only 2 top level elements. This creates a problem trying to match them up with the original surface list which has 3 elements.

Does anyone know how to either test for the missing index or insert a null at the gap?

I finally got the correct combination of search terms and found this discussion which was what I needed.