Hi Salva,
I still did not manage to explain the situation:
/tmp/ssh_del_$$.txt is complete (no line numbers)
two.out is complete (incl line numbers)
STDOUT misses a block of lines (see above)
STDOUT is missing the lines in total - numbers and content.
I'll continue to cut down the script to the needed fragments for reproducing it...