Check that nodes is populated before copying/unsetting it.