HPCC-9905 Fix problems with embeded functions returning datasets

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