The error can be reproduced using the ps exec (separed due the spam filter :P ) util:
ps exec -i -s cmd.exe
And from the cmd run the winscp commands.
Version 5.1.2 and 5.1.1.
With the old 4.3.9 and 4.3.8 this works fine, but the output with xmllog don't work as we expected.