Nesting and composing with aliases and anchors work

Don't go past the document end