HPCC-11244 Fix problem folding distribute on grouped null

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Merge pull request #5711 from ghalliday/issue11244

HPCC-11244 Fix problem folding distribute on grouped null

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>