Creating a series of rectangles from a variable depth list of lists of corner points

Thanks Ewan. That node seems to add more depth to my list of indexes rather than less.
So I’m trying to use the “Surface.ByPerimeterPoints” node to generate the surface and I get a “Points are coincident” error. I’m basically trying to do exactly what is in this thread : Get windows and door coordination and I’m stuck at the part where the guy says " OK, now I have a closed polycurve." I can’t get that polycurve or anything resembling it.