ICAO Air law rules date from 1949. Airlines are super aware of these treaties/rules whenever ownership changes hands. It's not like they thought about brexit as a particular scenario, it's more like, lets make sure the airline we're buying is actually embedded legally before stumping up the cash for it.
I imagine the notional Spanish control was originally intended more to protect their status as a Spanish company under Spanish law...