fix(engine): prevent job retries to become negative

related to #CAM-2884