HPCC-0000 Minor fixes to the code gen

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