I was going to comment on the immediateDescendants logic here, but git blame says I wrote it last December....  I'll have to reacquaint myself with the "first xblock beneath me, but none within that" idea.