To be clear in Heller the SCOTUS majority disregarded decades of case precedent as the dissent made clear.  Scalia writing for the majority was reduced to quoting excerpts from the Federalist Papers and colonial state constitutions to bend the "reasoning" to disregard the plain wording of the Second Amendment.