So, for now, until I figure out how to fix this, it will always prefer user_names before user_ids.

I think this is an argument for making users specifying whether it's names or ids up front, and not allowing mixtures. Assuming it might be a mixture and looking for names first is almost certain to produce inaccurate results at some point. We have ids precisely to avoid collisions with names, allowing for renaming users, and other cases. 

Yep, I just learned this the hard way and made a fool of myself in front of a bunch of people I admire.  So, I'd be glad if I'm the only one that this happens to.  If nobody objects, I'm going to allow the user to select whether their cohort contains user_ids OR user_names, and strictly prohibit mixtures.