The simple answer is, a private contract may have many things in it that the govt. can not do.
I can make a contract to not allow the use of the work RED in my home, it would be dumb but it is still a contract that if agreed to is quite binding under civil law.
Only contracts that force and illegal action are absolutly unenforcable
A contract that uses unlawful action to enforce a term will be deemed severable in the least and maximally unenforceable in the most.
So. No.