Mean-field analysis of multipopulation dynamics with label switching