First, inherit metadata from new document.  Second, use a special function for internal node equality.
First, inherit metadata from new document.  Second, use a special function
for internal node equality.

kristapsdz/lowdown,kristapsdz/lowdown,kristapsdz/lowdown