Improve logic for cohort visibility labels

TNL-25
I originally expected this to be handled in the front end, but it seemed to expand the scope of these changes to make that refactoring now. I was trying to just write tests and then fix the bugs in place.  Is that okay, or would you like to see this moved now?