index: handle the "insert after" case

Using a DocumentFragment. Test case included.