A&C,
the EU,which I am absolutely not a supporter of, might have many legislation holes but the various countries don't.
In Italy, for example, it is illegal to be a self employed pilot as well as it is illegal to subcontract workers unless you are an officially approved contracting agency and even then such practices are limited in time.
Same story goes for France where these immoral practices have been fought and won in court.
Having the UK withdraw from the EU could also mean that companies like Easyjet or DHL UK would have to go home and start making a living from their own internal market instead of exploiting the markets away from home by basing aircraft and crews abroad.