This allows us to support a different set of sockets per tree type in e.g. the repeat zone as in #141936.