Improve error reporting for issue #4