Fixes bug whereby the truncate and remove methods are not considered
to "expose" the document's tree structure.