HPCC-12408 Various code generator optimizations

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
previously the assert would only be triggered if rrlc() was true and ha() was false

now it will be triggered if ha() is false and rrlc returns true 

-i.e. the same test.