What year Subarus had head gasket problems

I bought a 2007 Forester used in 2009 (2.5l engine) with the hope that the problems had been solved by 2007, but the ‘black dots’ on CR for major engine problems keep showing up about 5 years after manufacture, now in 2007. So I don’t think the problem was solved by 2007. We haven’t had a problem yet. We’ll see…