Cooperative coevolution algorithms (CCEAs) facilitate the evolution of heterogeneous, cooperating multiagent systems. Such algorithms are, however, subject to inherent scalability issues, since the number of required evaluations increases with the number of agents. A possible solution is to use partially heterogeneous (hybrid) teams: behaviourally heterogeneous teams composed of homogeneous sub-teams. By having different agents share controllers, the number of coevolving populations in the system is reduced. We propose HybCCEA, an extension of cooperative coevolution to partially heterogeneous multiagent systems. In Hyb-CCEA, both the agent controllers and the team composition are under evolutionary control. During the evolutionary process, we rely on measures of behaviour similarity for the formation of homogeneous sub-teams (merging), and propose a stochastic mechanism to increase heterogeneity (splitting). We evaluate Hyb-CCEA in multiple variants of a simulated herding task, and compare it with a fully heterogeneous CCEA. Our results show that Hyb-CCEA can achieve solutions of similar quality using significantly fewer evaluations, and in most setups, Hyb-CCEA even achieves significantly higher fitness scores than the CCEA. Overall, we show that merging and splitting populations are viable mechanisms for the cooperative coevolution of hybrid teams.