#527 added code to check if the sort file can be created in ReserveTempFiles(). In TFORM, all worker threads run this check simultaneously, resulting in random failures on Windows (I guess the file is created with an exclusive lock).
I think we don't need worker threads to check the sort file availability. Only the master thread should handle this.