Add code to merge a pre-existing page tree with newly generated pages.