Rewrite Document::create_collection to work better with createNodeList.