take it to a good machine shop and let them check it
if they shave the head at all, you are going to have to make a "squish" adjustment, which means the cylinders are going to have to come off too( you adjust combustion chamber volume by using different cyinder base gaskets. Pretty sure there is only one head gaskt.. It gets a bit messy at that point, I'd suggest pulling the engine and doing it "right". 951 motors are brutal expensive to replace so you don't want to be guessing with this one. Likely the engine overheated if the head gasket failed, unless you found the bolts were loose, but a warped head is a pretty clear indication of deeper and more costly problems.