Prevent repeated queries to get groups.