This kind of thing has happened "around the place", and various people ended up with invalid licenses or ratings which they had to re-do, sometimes a year or more later when it came to light, but I have not yet heard of a case at a straight UK PPL flying school.
You are obviously entitled to a total refund of all expenses connected with re-doing the flight test.
It is especially bad because it is hard to imagine a UK FE not knowing when his FE privileges expire. In the other cases I know about it was 99.9% certain that the person concerned was fully aware he could not do testing.