HPCC-8808 Fix issues with truncation of lookup values

Minor changes following code review.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>