When checking for if dependency of type afterany, afterok and afternotok
don't clear the dependency if the job is completing.