Yes, that is as expected. allPageItems returns an array of every single pageItem, no matter how deeply embedded it is. myDoc.pageItems returns only top-level pageItems, i.e. not pageItems within groups. myDoc.groups returns only level-1 groups.
Thanks so much for the reply. Good to know.
One interesting thing I have run into is that when iterating through myDoc.allPageItems, I can view the individual page items in the data browser. However, it seems that once I encounter a group item, and view it in the data browser, the next Text Frame that I encounter crashes InDesign when I attempt to view the object in the data browser window (InDesign crashes, not ESTK). I have no explanation for it, but the workaround is to "don't do that". The code runs fine by itself - it's only the debugging portion of it that causes an issue. If you have ever seen this please let me know.