Fix canceling of interated trees

Change-Id: I290d3ff99de19107882cc5571b645faa95a004d6
Fix bug with dep handling of undef jobs

(foo)<-(bar)<-(baz)

If bar was undef, baz would start concurrencly with
foo. Only affected rcubic execution with -a/-A flags.

Change-Id: I30ffd2f74b667749c533f598accad40037188e66