Fix an incorrect inverse_of

This breaks things in strange ways...
Merge pull request #5747 from gmacdougall/fix-bad-inverse

Fix an incorrect inverse_of