I've explained that if someone is deliberately mean then their behaviour is a reflection on them rather than evidence of failure on dd's behalf.
Maybe this will help. The way we talked about this stuff goes something like this. Different kids are working on different stuff. What is stuff you are working on right now? Stuff like tying your shoes and remembering to say thank you. It looks like Jacob is working on remembering to take turns. When you were learning to take turns what helped you?..."
In this context you can also talk about how learning to walk away or make a different choice can be something she's working on too.
Really though I wouldn't give this much concern. In first grade there will be classroom rules and norms and she'll sort out where she fits in that context.