This makes it possible to parse documents where a doctype resides in a node, instead of being located at the root. Fixes #169