Followup a618491: fix JS errors when slugging near annotated inline nodes

We were incorrectly assuming that this.children[i].$element
would always be a direct child of this.$element. This is not
true for annotated inline nodes, so if there was a slug right
before one, we would call x.insertBefore( y, z ) where z is not
a child of x, which understandably causes an error.

Bug: 71418
Change-Id: Ic5bf22106bb8711a2b325c4c183c4ed86ccafd34
Merge "Followup a618491: fix JS errors when slugging near annotated inline nodes"