Fixed Coverity issue 1147770. We were reading a variable after
it had been freed in get_next_retryable_jobid. TRQ-2424