So you’re telling me that church run brothels and selling indulgences is all hunky dory because church teaching used to approve of those.
No, they're not "hunky dory" and no they are not now nor ever have been "church teaching". Nor is concubinage, sodomy, blackmail or slavery although these may have been practiced at certain times by certain people. These are scandals. Neither is it Church teaching when Bergoglio says "save the rain forests".
"Teaching" refers to the deposit of faith handed down from the Apostles.