UNIGENITUS (Section 3)[2]
Condemnation Of The Errors Of Paschasius Quesnel[1]
Pope Clement XI
Condemned
91. The fear of an unjust excommunication should never hinder us from fulfilling our duty; never are we separated from the Church, even when by the wickedness of men we seem to be expelled from it, as long as we are attached to God, to Jesus Christ, and to the Church herself by charity.
92. To suffer in peace an excommunication and an unjust anathema rather than betray truth, is to imitate St. Paul; far be it from rebelling against authority or of destroying unity.
The SPPX has violated Church teachings.
91 refers to heretics who, much like the Modernists, thought themselves attached to the Church, mocked the excommunications and teaching of the Church and asserted that they were still members of the Church.
It is difficult to tell what 92 is referring to, but it appears to state exactly the opposite of your false application to our concrete circuмstances.
But both imply that there can indeed be unjust excommunications, but this doesn't really apply to the SSPX since A) they were never excommunicated and B) the imaginary excommunications have been lifted.