There's a difference between a) a Cardinal who believes heresy and b) an actual heretic Cardinal, as declared by canon law.
Furthermore, cuм Ex is still in force
If any part of it is still in force, it's quite a small part. Here's the thing, the election laws which Pius X and Pius XII enacted, to keep the conclave going, do not contradict cuм Ex at all. They are in perfect agreement.
cuм Ex says that the election of a heretic is null and void. Yes, from the spiritual standpoint of the papacy, that's exactly correct. The question is, would the pope-elect regain his status as pope, if he were to return to orthodoxy? Most of you assume no, but cuм Ex doesn't elaborate, so this important point is debatable.
Pius X and XII's law changes allow a heretic to vote/be elected...but right afterwards...ALL spiritual penalties (including excommunication) kick back in. Which gives the same effect as cuм Ex...the spiritual aspect of the papacy is null. But...this leaves more questions:
a) This elected heretic would be the temporal pope, because he was validly elected. He just has no spiritual authority.
b) Would he regain his full spiritual powers, if he converted? I would assume a strong "yes".
Either way, in a general sense, both laws have the same result: A pope with temporal/govt power, but with no spiritual authority. Popes Pius X and XII clearly wanted the election to be valid (in a temporal sense) because otherwise they would have said the whole ordeal is null. Instead, they clearly wanted the human side of the conclave to be valid (which popes have the power to "bind and loose" human rules) but they kept in place the spiritual penalties.