ENYO-1429: extract inner processing into new function
ENYO-1429: extract inner processing into new function

newbie mistake: the closure have function scope and not loop scope.
Their value was not protected from the next cycle in the loop.
Placing the closure into inIter protect them.

Enyo-DCO-1.0-Signed-off-by: Dominique Dumont <dominique.dumont@hp.com>

mcanthony/ares-project,enyojs/ares-project,enyojs/ares-project,enyojs/ares-project,mcanthony/ares-project,mcanthony/ares-project,enyojs/ares-project,mcanthony/ares-project,mcanthony/ares-project,mcanthony/ares-project,enyojs/ares-project