We may end up in a situation that 'workflowEnded' step may be "set" second time for a task triggering related workflow actions
Add checks for workflow steps and make sure this will not happen