Even so, I admit that my reply was not the easiest to follow. Perhaps that's all the poor man was reacting to. So I want to restate my explanation here, in the hope that reactions will be less dismissive. Please keep in mind that what's at issue is just another instance of the mysterious interaction of grace and human freedom.
Consider sin and freedom first. Original sin, even when washed away by baptism, has lingering effects which make it inevitable that each person who's reached "the age of reason" (i.e., of moral responsibility) actually sins at some-or-other time. That actual sin is inevitable for such people is, at any rate, a fact even non-believers may infer from experience. But given that people with moral responsibility, precisely as such, retain a measure of free will, it cannot be inevitable for them to sin at any particular times--save when some of their actual sins have been made inevitable by their previous, freely committed sins. Thus actual sin is statistically inevitable for the people in question (including anybody who's reading this), but not deterministic in a way that's incompatible with free will. For if it were the latter, we would not be morally accountable for at least some of our actual sins, which would be a conceptual absurdity. That's why the Council of Trent defined original sin with the word reatum, a legal term which means roughly "liability to punishment." Everybody who inherits original sin is liable to punishment because if they live past the age of reason, they will actually sin at some-or-other point--even though original sin itself is not actual sin, but only the inherited absence of that share in his own life for which God created humanity.
Now for the main question at hand. By virtue of the unbreakable promises of Christ, it is inevitable that both the Church as a whole and the Magisterium in particular--at least as long as the latter exists--preserve the apostolic deposit of faith complete and incorrupt. From that, it follows that neither the "ordinary and universal magisterium" nor the "extraordinary" magisterium will ever use its authority in such a way as to bind the Church to a heresy. But it is by no means inevitable that any particular bishop, including the bishop of Rome, will persevere in the Faith at all, never mind teach the Faith in its fullness. For each and every member of the Church, believing and professing the Faith in its fullness is the result of a free choice to accept the divine gift of faith. And just as faith is freely received and manifested, so too is formal heresy (material heresy, when that is the correct term for somebody's belief, is often unchosen, because it is often unreflective and thus unintentional). Hence any bishop, including the pope, can freely become a formal heretic. But the Catholic doctrine of the Church's indefectibility in the Faith entails that even when many bishops, including whoever's pope, fall away from the fullness of Faith, not all will. The Magisterium as a whole will never successfully manage to use his authority in such as way as to bind the Church to a heresy--and on Catholic doctrine, the pope in particular will never manage to do that, even if he chooses and aims to. Consequently, the divinely granted grace of the Church's indefectibility is a grace of providence for the Church as a whole, not for any of her individual members, including the members of the Magisterium. Individual free will is not thereby coerced within the soul, as Protestant monergists imagine by holding that grace is irresistible. For instance, if and when the pope's free will is overridden by such a providential grace, it is overridden only in the sense that his will's intention to bind the Church to his heresy is externally frustrated in its execution. That, I believe, is what actually happened when Pope John XXII tried to teach his heresy about "the beatific vision."
Now I realize that many non-Catholics will be unmoved such an explanation. Since they don't see reason enough to believe that Catholicism is true to begin with, they do not share the suppositions that frame the logical problem I've sought to resolve. But I do believe I've shown that Catholicism is internally consistent in the present respect. And that's the sort of thing that must always be shown, when there's a serious question about self-consistency.