For all those years, the institutional Church got its teachings on slavery wrong. The institutional Church owned slaves and ordered people into slavery. Now, of course, the teaching is that slavery is intrinsically immoral. That's just one example.

Some traditionalists here will claim that the magisterium never taught that slavery was moral, or that they meant some other sort of slavery than chattel slavery, a kinder, gentler slavery. One of the requirements for being that sort of traditionalist is a willingness to ignore facts that don't support your fantasy.