Fixed insertBefore for textNode.