The question revolves about a 1913 law designed to keep the peace with anti-miscegenation states. It remains on the books as:
CERTAIN MARRIAGES PROHIBITED Chapter 207: Section 12: Legal ability of non-residents to marry; duty of licensing officer to ascertainThis statute has prevented Massachusetts from recognizing out-of-state same-sex couples' marriages. This is true even for New Yorkers, whose attorney general has said he will recognize the marriages. Couples there are waiting for the Massachusetts ruling before filing state income taxes jointly in New York.
Before issuing a license to marry a person who resides and intends to continue to reside in another state, the officer having authority to issue the license shall satisfy himself, by requiring affidavits or otherwise, that such person is not prohibited from intermarrying by the laws of the jurisdiction where he or she resides.
GLAD filed a suit on behalf of Connecticut couples denied licenses by Massachusetts town clerks adhering to the current law. See the complaint (in PDF) here.