@JLeslie That question is precisely why the Court’s decision on the Proposition 8 case is not the end. Here’s what is clear, legally speaking: if you marry someone of the same sex in a state that recognizes same-sex marriage and you live in a state that recognizes same-sex marriages, then you qualify for the federal benefits (regardless of whether the state in which you were married and the state in which you live are the same state).
What is unclear is what happens in the scenario you brought up. One purpose of DOMA was to suspend the Full Faith and Credit Clause of the US Constitution in the case of marriage. By excluding same-sex couples from federal benefits no matter what, there could be no conflict scenarios like the one you describe. Without DOMA, there can be such conflict scenarios (which Scalia’s dissent alludes to in mourning the decision).
Since these are federal benefits, it should not matter where a couple lives so long as their marriage was legal at the time and place it was performed. Logically, legally married same-sex couples who move to states that don’t recognize same-sex marriage will simply have to calculate and file their federal and state taxes in two different manners (one as if they are married, the other as if they are not). But is this feasible in the long term?
There are two problems here. First, the moral crusaders of some state or another may attempt to block same-sex couples in their state from filing for federal marriage benefits. This would be strategically insane, but I wouldn’t put it outside the realm of possibility. Second, a same-sex couple could sue their state for recognition under the premise that the Full Faith and Credit Clause, now fully restored, requires each state to recognize the marriages performed in every other state (as it has always been understood to do).
In either situation, we end up with a new case. Moreover, these are just two ways in which the issue could rise to federal attention again. So the short answer is that there is no clear legal answer to your question at present. Opponents of same-sex marriage are in a bit of a bind here. The smart thing to do is not push back lest they lose even more ground. But by not pushing back, they’ll lose ground anyway as same-sex couples interpret their rights ever more broadly. Long story short, this war is won. It’s just a matter of making it official.