This can happen when an avatar-flair component is rendered to an anonymous user on a login_required site (e.g. when they are redeeming an invite). The lack of group information was causing an error to be raised. With this commit, it now simple skips rendering the flair.
It’s a tiny “optimization”, but if there are no groups available, then we could skip the whole loop, right?