Pass `nodeStack` into `nextTextNode` the same way you do in `pushNodes`.