t6046/t9833: fix use of "VAR=VAL cmd" with a shell function