From the example you've provided, I gather the question you're asking is "what happens if someone publishes something that they're not licensed to publish?", is that correct?
If so, I believe the answer is "mostly nothing". A third party publishing (or republishing, really) content in a context where they implicitly or explicitly agree to license the content to others, when they have no license to do so from the owner of the IP in question, would be a straightforward violation of copyright in most jurisdictions. It has no impact upon the terms that the content is licensed under.
For instance, if I find some GPL'ed code on github and copy/paste in onto SO, that action doesn't have the effect of removing the GPL from the code. The license terms are whatever the original author of the code specified, and unless they give permission to relicense their code under CC-BY-SA (or soon, MIT) then 1) no such relicensing happens just because I post their code, and 2) it's not technically valid for me to be posting their code like that in the first place.
In principle, the owner of the IP could sue for injunctive relief (and possibly damages) in most jurisdictions in such a case, both against the person who illegally republished their IP and against anyone they find using it (saying "I found it in a post on SO, which means I can use it if I want" should protect you from being liable for damages but won't let you keep using the IP without a license if you can't show that 1) the plaintiff published their content on SO, or 2) the plaintiff gave somebody else permission to publish their content on SO). In practice, however, it's relatively uncommon for such litigation to be brought, and even less common for such cases to actually proceed to trial.
Which brings us back to "mostly nothing". If the owner of the IP never finds out that their IP has been illegally republished, then certainly nothing happens. Or if they do find out, then they might request that the content be removed. Or negotiate licensing terms with anyone using it. Or if they're particularly militant and have deep pockets and can see an upside to litigation, maybe they'll sue. However that last outcome is generally unlikely unless the violation is particularly egregious, or if their takedown requests go unheeded.