Honestly the idea of accusing the head of a religion of spreading heresy is baffling to me.
It depends on what you mean by head and religion.
Well, I mean, Mormons accusing the LDS prophet of spreading heresy would be unthinkable. That's the kind of talk that gets a person excommunicated.
This isn't the first time this has happened in the Catholic Church.
Pope John XII was the most recent case where a pope was accused of spreading heresy, recanted on his deathbed, and his successor declared what he had said was heretical. The idea that the pope is infallible also implies all of the previous popes were infallible too (when teaching in an official capacity). Practically every major controversy in Church history has had something like this at some point.