LPS-32146 Encapsulate logic for filtering groups by name