Add '==' and '!=' operators.

Also, optionally cache recursive choices.