Fix issue with nodes walked multiple times