Fix the assertion failure with inserting node contains child which has id into the document

https://github.com/mozilla/servo/issues/2630
auto merge of #2634 : saneyuki/servo/fix, r=Ms2ger

Fix: #2630