My (long-winded) two cents:
I think it should be obvious to any reasonable observer of this debate that it cannot be settled on plain text alone. Neither a meaning that entirely ignores the qualifying phrase, nor one which arbitrarily limits the amendment to serving only that purpose is appropriate. It is genuinely ambiguous without some kind of context.
So, like many sticky Constitutional issues, the question becomes what do we do when the text is insufficient? An Originalist of the Scalian stripe will ask what the text meant to those who adopted it. On this count, the evidence is conflicting. Early courts interpreted the amendment as not providing an individual right. It would be odd indeed for such an Originalist to believe that a court in 2008 has a better idea of the original meaning than the courts closer to the enactment. Yet, other contemporaries of the text—including some of the framers—may have interpreted the text as providing an individual right.
The story is similar if we look to the intent of the framers. It is clear that some thought the amendment limited the federal government’s power to disarm militias. Others believed the amendment provided an individual right for purposes of self-defense, hunting, etc. In all likelihood, there simply *were *divergent intentions as there is for almost all legislation today. Privileging one intention over another is not the role of the Supreme Court, and this would be anathema to Scalia (in theory, while perhaps not in practice) and Ginsburg alike.
Where does this leave us? If plain meaning, original meaning, and original intention are all mired in ambiguity and divergence, what do we do? The only good answer is to amend the amendment to be consistent with whatever our democracy now believes. Since that’s not going to happen, the court must simply find some other basis on which to decide. I suspect that this basis will be political allegiance. But there are alternatives. The court could defer to public policy goals, or simply the principle of stare decisis (to the extent the previous courts have settled the issue). Or the court could reason that the tie goes to the legislature, as it were. This would be a deeply democratic decision, believing that in the absence of a clear Constitutional restriction, a legislature should be free to pass reasonable laws. Interestingly, this is the very situation that a Scalia or a Thomas would defer to the legislature. But in this case, they are not likely at all to do so. And they would not be the only ones free of hypocrisy if they were to follow this road since this ambiguity-goes-to-the-legislature rationale would seem to contradict many liberal sacred cows as well.
If it were up to me, regardless of the decision for D.C., I would limit the holding to federal laws. I would not incorporate the Second Amendment on the basis that it is, at least in part, about the relationship of citizens to the federal government. That way, however the merits came out, we could let the laboratories of democracy decide for the majority of Americans (something conservatives generally favor, but again, will almost certainly not favor in this case).