Now that the groupslib functions that prepare SQL to fetch members of a group have been updated to support multiple groups (groups_get_members_ids_sql and groups_get_members_join), we should update related methods that utilise these to support the same where applicable.
Some examples to investigate include:
get_enrolled_with_capabilities_join
get_enrolled_sql
get_enrolled_users
count_enrolled_users