Fix crash when transferring internal pytest warnings from workers to the master node.