PDI-12504 Scheduling seems to schedule twice when an error in initializing of a step happens

Cherry-pick from 5.2/master