Make sure that we always at least one group available for a user.
Merge pull request #1891 from jburel/search-crash

Group was excluded.