EB ... as I think you know, dd is very happy in her harmonious class (all girls) at school. So I am thinking about this from the other end, and wondering why there seems to be so little "meanness" (actually, basically, none, as far as I've heard) in her class.
I can only think it's down to some very deliberate social engineering (of the kind some parents might actually disapprove of, I guess) that the school (quite openly) does: active discouragement of "best" friends, for instance - so that if a couple of girls are becoming exclusive they are deliberately moved to separate tables, or given different work-pair partners; and a whole lot of quite formal, explicit "nobody gets left out" moral-teaching. Perhaps it's an example of the effects of zero tolerance - if you discourage something as apparently harmless as best-friend-pairing, then you don't get the further complexities that follow on from that?
I recall a discussion on a similar topic a while ago, which came down to trying to find ways to "dilute" the mean child's influence, or, for the victim-child, to feel it as diluted - as it is that, isn't it? Once somebody, child or adult, has been nasty to you, they then have a sort of power, a presence, that is somehow very difficult for the victim to completely shrug off. It is truly hard to ignore someone you feel has it in for you (even if they've completely forgotten having been nasty, or had been mean more by thoughtlessness than malice).
The best way of shrugging it off is to have something else (someone else, lots of someone elses) to get immersed in. But it's asking a lot of a child to be able to take that sort of long view, or be all well-set-up with lots of other friends to do the dilution. Maybe it's worth talking to the teachers to see if they can break down the groups?