Fix a notice if no channels are visible.
Fix fatal error when a logged-in user can't view any channels. Fixes #326