Make sure we adopt the child that we are inserting

Even in the case where the real dom does not have a parent it is
important to do the adoption for the ownerDocument to stay correct.