HPCC-11243 Correctly catch invalid (blank) module names

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Merge pull request #5730 from ghalliday/issue11243

HPCC-11243 Correctly catch invalid (blank) module names

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>