I've unsuccessfully tried to fix this, but I've come up with an idea how an actual fix might go.
When the merge flag (which I added in recent commits) gets passed to MVM_proc_spawn or MVM_proc_shell, we have to first create a new pipe on our own, then set up both stdio 1 and 2 to UV_REUSE_STREAM and set the stdio_container.data.stream to the pipe we've created.