HPCC-8842 Fix problems with module inheritance

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

HPCC-8842 Fix problems with module inheritance

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>