This is a drastic simplification of what (I think) is going on it the DO/pipe thread. It uses only internals and Windows's SORT.EXE. Now it seems to have something to do with @EXECARRAY and @EXECSTR but I'm pretty much at a loss and that's just a guess. Using these two BTMs (attached) ...
This is what I get from v25 build 21.
In contrast, this (which is expected) is what I get from v25 build 20.
v:\simplified> type caller.btm echo %@word[1,%@execstr[call .\callee.btm | ffind /vkme"average"]]
v:\simplified> type callee.btm setarray /f z echo %@execarray[z,echo 5^r^n4^r^n3^r^n2^r^n1 > tmpfile] > NUL c:\windows\system32\sort tmpfile echo average 666 unsetarray z
v:\simplified> callee.btm 1 2 3 4 5 average 666 v:\simplified> caller.btm <output file> The pipe is being closed. ECHO is OFF
v:\simplified> callee.btm 1 2 3 4 5 average 666 v:\simplified> caller.btm 666
148 bytes Views: 34
68 bytes Views: 35