A way around this is to create a custom entity to link queues to teams and to write a plugin that runs whenever a team’s memberships changes. The plugin needs to fire when the Associate and Disassociate events are raised and a user is added or removed from a team. The Associate and Disassociate events are not linked to any specific object type as you can see on the registration screen so you need check in your code that the event relates to team membership.
Below is some sample plugin code that fires when a new user is added to a team and the associate event is triggered. The code checks if it’s a team member relationship event and then it searches a custom entity called new_queueteams for the queues that the team is a member of.