Restore previous code to appendNode/prependNode.