I know the author said that sub layers are not supported by design but wanted to just mention this here in case anyone else comes looking:
This thread has some solutions to the problem of finding out the order of layers and page items relative to each other.
https://forums.adobe.com/thread/538263
In short, it suggests getting this information from the document.pageItems property. I've also confirmed that this does seem to work
I know the author said that sub layers are not supported by design but wanted to just mention this here in case anyone else comes looking:
This thread has some solutions to the problem of finding out the order of layers and page items relative to each other.
https://forums.adobe.com/thread/538263
In short, it suggests getting this information from the document.pageItems property. I've also confirmed that this does seem to work