Rework the code that ensures two bots don't do the same work.

I can't see what's wrong with the old code, but hopefully this works.