I'm not sure if this will cause a problem, but there's currently a TODO in DOMUpdater.update() that points out that in the case of an incremental rebuild, the nodeMap on the rebuilt subtree never gets nulled out, so there might be some case in which you find that nodeMap instead of the root one. The right answer is probably to just null it out on the subtree at the end of the update (I can't think offhand of any reason to keep it around).