i cant reproduce this incorrect order effect, I can only reproduce the first line not showing, and i assume this would be caused by the same effect as NOT using the t switch in $read(file,t)

I used this to test (6.16 & 6.17)
//!write -c playtest.txt | !var %x = 1 | !while (%x <= 10) { !write playtest.txt %x | !inc %x } | !run playtest.txt | !play playtest.txt 1

1 in italics as tried with and without it.

results were
<DaveC> 2
<DaveC> 3
<DaveC> 4
<DaveC> 5
<DaveC> 6
<DaveC> 7
<DaveC> 8
<DaveC> 9
<DaveC> 10

Both locally and using a 2nd nick observing the channel