Improve logic for cohort visibility labels

TNL-25
A thread can't be assigned a group_id for a non-existent group. If that exception is raised, it's due to a programming error, so I think allowing the error to escape is the most appropriate thing here.