Earlier quoted context omitted.
Slavery was fine under the law. Once the Constitution was amended to prohibit it, the Court had no problem upholding that.
The Constitution was amended to explicitly prohibit Congress from making laws abridging the freedom of speech as well. What's relevant is the Supreme Court reconsidering a previous decision without any change to the Constitution, but that too has happened before, e.g. Brown v. Board of Education.
I’m not taking a position here, just pointing out the implications of the slavery thing.