(Actually, I don't think it's the EU, but the EEA, which is slightly different.)
Some UK tax rules have been outlawed because they discriminate against foreigners. It seems Spanish Inheritance Tax also did, and some Brits were incorrectly forced to pay it. But they are getting refunds.
Spanish holiday home tax fiasco: Britons finally receiving refunds The Spanish government is refunding thousands of Britons after it charged "discriminatory" rates of inheritance tax