It can be repaired don't worry, the most likely way would be to lock a stud/s on this cap position.
Will need milling to get bang on, don't you just love it when you have to fix others bodges, people like this should be shot IMO.
I don't know of a machinist in your area, but my advice would be have a good look around first, and don't just take the cheapest, if they screw it up you are buggered, but at the mo it is defo saveable, and relatively straightforward.
tabetha