Improve an error message.

See #1397.