Fix "Can replace a node with some other node" in IE<9