Copy node argument before manipulation. fixes #17 and #18