find_worker_by_random behavior

Dinesh's changes to find_worker_by_random() modified the behavior of the function (it would preferentially select the last worker in the list).  This patch restores the old behavior, while eliminating the segfaults caused by the old code.