Over the centuries there has been a tension between the true Catholic Faith and the Catholic Church as a political power center. Some popes (and the cardinal that put them there) have been men of God, some have been very evil men, philanderers and even murderers. So as you can imagine, that bad doctrine during periods of "other agenda" takes time to fix. But there always remain those faithful, though sometimes they have been killed for it.
Because of this, I choose to separate faith from church, and compare teachings of the Church with scripture. Of course, this same thing got more than one Catholic Bishop, Priest and Monk burned at the stake. But when the Church contradicts scripture, who are we to believe? man or God?