There are clauses in contracts and agreements that cannot be inforced, and are ruled illegal, all the time. For example, clauses like "you cannot sue us for any reason", are included in a lot of contracts, but you still retain the right to sue even if you agree with them. There are certain rights that cannot be given away in agreeing to a licence, even if the license says you are.
If it wasn't possible for part of the agreement to be illegal, there wouldn't be a clause that specifies what happens if part of the agreement is deemed to be illegal.
I'm not exactly sure which ones are in US law, but in Canadian law, for instance, the act dealing with consumer agreements with corporations (say: cellphone planes) says "The substantive and procedural rights given under this Act apply despite any agreement or waiver to the contrary." - a cellphone company for instance cannot charge you the early cancellation fee if you terminate the agreement as per the consumer protection act- because the act specifies that a termination under the act occurs 'as if they never existed', even though the agreement made with the cellphone company says that you agree to pay the cancellation fee if you terminate for any reason.