check if the node to be added is an accestor for addPreviousSibling and addNextSibling.
fix https://github.com/moovweb/manhattan/issues/674