Improve an error message.

See #1362.