Improve error reporting of the 'gives' function.