https://bugs.winehq.org/show_bug.cgi?id=48618
--- Comment #20 from Henri Verbeet hverbeet@gmail.com --- Created attachment 69089 --> https://bugs.winehq.org/attachment.cgi?id=69089 patch
The attached patch helps here. It's not ideal in various ways, but as a proof of concept it might be good enough for this kind of use case.