Remove escaped_domains reference.
Get all groups under a tree.

This is used when we just want a plain list of groups. For example, for listing groups under the configured domain bases.