The law is not a smart contract with exploitable loopholes; obvious malice like you describe would be found illegal.
A judge's job is not to apply the law to the letter, but to the spirit. They are not going to throw their hands up when a tenant is kept out of their unit, no matter what the landlord might have decided to sneak in into the rental agreement: the law is there to protect the tenant.
If the contract said “and you agree to give me your life savings” somewhere in the fine print that doesn’t make it enforceable.
It’s like half the point of having these things in law so landlords can’t put them in lease agreements.