Added tests for appending to detached node.