Fix the "module class %s" not found error message (see #5871)