HPCC-9282 Ensure the correct name for an expression is extracted

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