Don't unconditionally release lock when updating job state.