For example, ContainerNode currently calls document()->nodeWillBeRemoved() _before_ DOMNodeRemoved, allowing event listeners to see a tree containing a node that, as far as selection is concerned, is not in the document.
Fixed in http://trac.webkit.org/changeset/115686.