Engine over rev caused by over stretched valve springs is the most common thing to cause damage to camshaft retaining pins and the rocker adjusters punch into the inside of the valve cover. This is a replacement genuine Subaru valve cover
kx21 stock valve cover
new valve cover note dimples for rocker adjusters
new stock and damaged cover on the right.
typical damage of over revved kx21 with weak valve springs.