Since the end of Don't Ask Don't Tell, gay troops have been in the odd position of being able to publicly say who they love, but because of the Defense of Marriage Act, they haven't been able to get benefits for their partners. That changed on Wednesday, when Defense Secretary Chuck Hagel said he welcomed the Supreme Court's ruling striking down the law"The Department of Defense intends to make the same benefits available to all military spouses — regardless of sexual orientation — as soon as possible," Hagel said in a statementBut there are still some small problems. Anti-gay principles are literally encoded in the military's system for giving spouses benefits.

The Defense Enrollment Eligibility Reporting System does not allow gay marriages, Stars and Stripes explains. This has been a problem for transgender veterans whose benefits are maintained in DEERS, because the military won't switch a veteran's official gender if it would then take benefits away from his or her spouse. And the Veterans Administration currently defines a spouse as "a person of the opposite sex who is a wife or husband." That goes away with DOMA. But benefits are calculated based on where a veteran lives. Here's how tricky it gets:

Veterans who traveled to get legally married while living in a state that does not recognize gay marriage, and who received benefits in a state that does not recognize gay marriage, are likely not considered married under VA law, [Outserve-SLDN's David] McKean said. All others — including those who live in gay-marriage recognition states when they’re married but live in non-recognition states when benefits take effect — are considered married by the VA, he said.

Military benefits involve more than the usual civilian stuff. Married troops can get housing on post with their spouses; spouses get big things like health care and little things like the right to shop at the subsidized grocery stores on post. Troops' spouses get access to information about where their loved one is deployed, and they're the first ones notified if their loved one is hurt. In February, the Defense Department granted more benefits to gay spouses — they could go on post, but they couldn't get health care or on-post housing. Then-Defense Secretary Leon Panetta said in a memo that if DOMA fell, the Pentagon would have to decide whether to recognize gay marriages or civil unions as well. Hagel's announcement gives gay spouses full benefits, but he didn't offer details on timing or domestic partnerships.

Unlike the rest of us, troops can't vote with their feet — they can't move to states that have laws they like better. And while a gay soldier might be able to take advantage of legal gay marriage while stationed in, say, Fort Drum, New York, she might be forced to move to Fort Bragg, North Carolina, where a state constitutional amendment banning gay marriage just passed. Following those state laws — granting benefits, and then taking them away — would have created a huge headache for the Pentagon, Loyola law professor Douglas NeJaime told The Atlantic Wire. Granting benefits to all married gay couples "makes it easier for the military."