HPCC-11243 Correctly catch invalid (empoty) module names

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>