Fixed a deadlock in insert_into_alljobs_by_rank when
the job found in the list is already in the list. TRQ-2473