JBPM-4029 - Improve gateway handling when inside a loop - keep track of iteration over nodes