We have an optimization in Node.insertBefore(newNode, refChild) to avoid doing any work when newNode == refChild or newNode.nextSibling == refChild. This optimization is not in the specification:
The issue is that this optimization is observable with DOM mutation observers / listeners or DOM ranges.
Created attachment 285768 [details]
Comment on attachment 285768 [details]
Clearing flags on attachment: 285768
Committed r204368: <http://trac.webkit.org/changeset/204368>
All reviewed patches have been landed. Closing bug.