Updated ChangeVariables.

It's better when both oldEquals and newEquals is specified. This helps
dealing with functions with ambiguous inverses.