Fix NepheleJobGraphGenerator bug with iterations

When traversing it is not checked whether iterations where already
visited, this led to a bug when you used the output of an iteration
twice.