We can just use the non-recursive depth first iteration
of nodes when scanning for atoms to select for a given
scope level instead of using recursive calls to achieve
the same effect.
This makes it possible to have large and heavily nested
flows that are not restricted by the python stack limit.
Change-Id: I0d18565680f777adbdfca9d4983636c6b3e848da