updateNameForTreeScope and updateNameForDocument are called in insertedInto and removedFrom. It doesn't make any sense to assert that the removed node is in a document or tree scope when they're called in removedFrom.
Created attachment 217390 [details] Removes the assertions
Comment on attachment 217390 [details] Removes the assertions Clearing flags on attachment: 217390 Committed r159566: <http://trac.webkit.org/changeset/159566>
All reviewed patches have been landed. Closing bug.