Simplify handling of multiple top-level nodes after parsing