As a teacher, I find that sometimes class marks do not always match a child's ability. How does this happen? When one takes into account participation, completion of work as well as the accuracy, the class grade can become inflated. Also if students re-do work to raise grades (which is great) it can give a false sense of accomplishment, as end term exams do not allow for repeated submission of work.
I am in the US, but imagine to some degree things are alike. I agree that maybe she will be moved early on next term, or that she will succeed in a lower group and hopefully that will help her esteem.
I would call the nasty friends' parents and ask them to discreetly talk to their children about how their friend must be feeling and how would they feel if they were in her shoes. Of course this only will work if they don't say',"so and so's mum called...."
Good Luck and as I tell the parents of my teenage students, "This too shall pass."