Clone cached node. Fixes #1705 and #1706