Improve error message for missing module

See Issue #9351