thorium: fix an iterator bug in node

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>