There is a very fundamental principal in law that says;


“ You can not achieve by contract;….. that …..what can not be attained at law. “


This means no contract is valid that contradicts the law, regardless what the agreement says. It does not matter how elegantly wrote the contract is; on the day of judgement, it is useless in the eyes  of the law.


With this goes the premise,


“ That no one should knowingly with intent, enter into a contract that contradicts the law and would obviously cause damage to others ”


If you apply these premises to the facts available; it is very obvious  what is going on.