BZ-1075134 - Simulation Engine: Simulation which contains parallel gateway fails

(cherry picked from commit af7a668e1be43b389295236bc7ab203514599ec9)