Sure it will. Because you agreed to wave those rights and go by the terms of the lease even though they are against what the law dictates. Since the Lease is also a binding contract, one that is agreed upon by both parties, it would super cede the law for that fact. The Lanlord could be taken to court in a separate case for bypassing the law and forcing a tennant to agree to such terms, since the terms were previously agreed upon they would be held up in court.
Landlord/Tennant Laws are strange like that. I have studied several cases where something in a Lease broke even Federal Law, but was still held up on court since the lease was signed and agreed upon by both parties. That is not saying that another case was brought against them once it was found out that those terms were illegal.
But a Lease is a legally binding agreement any which way you look at it.