All of the actions of the churchmen that are those things are certainly not Catholic, but the Church is still the Church.
Or perhaps you can put it this way. Picture a bottle of miraculous medicine. The label of the bottle says that it is, and the pills inside are what the label says. And supposing that in this bottle, there was an unlimited supply of this miraculous medicine, which you cannot get in any other bottle anywhere else. Now supposing some joker comes along and dumps a handful of lethal arsenic pills into the bottle. Well, the bottle is still accurate, as is the fact that you can't get the miracle medicine anywhere else, or in any other bottle. The infinite supply of miraculous medicine is still in THAT bottle, and that bottle only. It's just that because of the prankster who put the arsenic into the bottle, you'll have to be very careful what you're taking.
But it will do you no good to go to any other bottle or any other medicine, or to decry the bottle and the medicine that were true and indeed miraculous, just because there are pills of arsenic mixed in. Obviously, some day, someone will have to sort the two out, so that those who come to this bottle will no longer risk being poisoned and dying. Nevertheless, what the bottle says about the true medicine is no less true, nor has the location changed.
You might say the church or even the pope is that bottle. It may contain a little arsenic, but the arsenic doesn't belong to the church (or to the office of the pope, even if to the man holding the office). Yet the church remains where and what it is, regardless of the human arsenic that may be residing under it's label. But those who are not dumb enough to reach in blindly and start gobbling, so to speak, are quite safe from the arsenic, and quite free to benefit just as much from the miraculous medicine that is Catholicism.
Even if the heads of the churchmen contain a little arsenic (and in some cases mostly arsenic), God can still use them to administer the real article. He's just that powerful. Even the devil can be made by God to tell the truth. And I don't think the folks in Rome are (for the most part) quite THAT bad.
But I desist... that's another topic from the italian military occupation...