fix(search): correct group search queries (closes #4635, fixes #2761)