If the pope contradicts a teaching, doctrine or council, then the action is no longer infallible.
From the Catholic Encyclopedia:
"EXPLANATION OF PAPAL INFALLIBILITY
The Vatican Council has defined as “a divinely revealed dogma” that “the Roman Pontiff, when he speaks ex cathedra – that is, when in the exercise of his office as pastor and teacher of all Christians he defines, by virtue of his supreme Apostolic authority, a doctrine of faith or morals to be held by the whole Church – is, by reason of the Divine assistance promised to him in blessed Peter, possessed of that infallibility with which the Divine Redeemer wished His Church to be endowed in defining doctrines of faith and morals; and consequently that such definitions of the Roman Pontiff are irreformable of their own nature (ex sese) and not by reason of the Church’s consent” (Densinger no. 1839 – old no. 1680). For the correct understanding of this definition it is to be noted that:
what is claimed for the pope is infallibility merely, not impeccability or inspiration (see above under I).
the infallibility claimed for the pope is the same in its nature, scope, and extent as that which the Church as a whole possesses; his ex cathedra teaching does not have to be ratified by the Church’s in order to be infallible.
infallibility is not attributed to every doctrinal act of the pope, but only to his ex cathedra teaching; and the conditions required for ex cathedra teaching are mentioned in the Vatican decree:
The pontiff must teach in his public and official capacity as pastor and doctor of all Christians, not merely in his private capacity as a theologian, preacher or allocutionist, nor in his capacity as a temporal prince or as a mere ordinary of the Diocese of Rome. It must be clear that he speaks as spiritual head of the Church universal.
Then it is only when, in this capacity, he teaches some doctrine of faith or morals that he is infallible (see below, IV).
Further it must be sufficiently evident that he intends to teach with all the fullness and finality of his supreme Apostolic authority, in other words that he wishes to determine some point of doctrine in an absolutely final and irrevocable way, or to define it in the technical sense (see D size=-2>EFINITION). These are well-recognized formulas by means of which the defining intention may be manifested.
Finally for an ex cathedra decision it must be clear that the pope intends to bind the whole Church. To demand internal assent from all the faithful to his teaching under pain of incurring spiritual shipwreck (naufragium fidei) according to the expression used by Pius IX in defining the Immaculate Conception of the Blessed Virgin. Theoretically, this intention might be made sufficiently clear in a papal decision which is addressed only to a particular Church; but in present day conditions, when it is so easy to communicate with the most distant parts of the earth and to secure a literally universal promulgation of papal acts, the presumption is that unless the pope formally addresses the whole Church in the recognized official way, he does not intend his doctrinal teaching to be held by all the faithful as ex cathedra and infallible. "
No mention there of the Pope being bound by previous Councils or tradition. In fact the opposite, Councils have declared themselves bound by Papal teaching. From the same article:
"* the Fathers of Ephesus (431) declare that they “are compelled” to condemn the heresy of Nestorius “by the sacred canons and by the letter of our holy father and co-minister, Celestine the Bishop of Rome.”
- Twenty years later (451) the Fathers of Chalcedon, after hearing Leo’s letter read, make themselves responsible for the statement: “so do we all believe . . . Peter has spoken through Leo.”
- More than two centuries later, at the Third Council of Constantinople (680-681), the same formula is repeated: “Peter has spoken through Agatho.”
- After the lapse of still two other centuries, and shortly before the Photian schism, the profession of faith drawn up by Pope Hormisdas was accepted by the Fourth Council of Constantinople (869-870), and in this profession, it is stated that, by virtue of Christ’s promise: “Thou art Peter, etc.”; "the Catholic
religion is preserved inviolable in the Apostolic See."
De facto, though, whatever Popes teach infallibly will be in accord both with prior councils and tradition.
And the Holy Spirit certainly works to protect the unity of Church teaching - one Pope, for example, died shortly before he was due to promulgate a Bible translation that was full of errors. But that’s neither here nor there.
I’m open, though, to see your evidence that Popes ARE so bound.
.