where an employee of a diplomatic mission or consular post who is a national of a "sending State" opts to be subject to the social security legislation of the "sending State" (under EC regulation 1408/71 Article 16(2)), this does not mean that the employee's spouse loses the social security benefits provided by the Member State in which (s)he resides.
For relevant general notes see Diplomatic immunity and similar and Social Security /reciprocal arrangements in the EU .