http://bugs.winehq.org/show_bug.cgi?id=31747
--- Comment #1 from Henri Verbeet hverbeet@gmail.com 2012-09-28 13:19:19 CDT --- Created attachment 41868 --> http://bugs.winehq.org/attachment.cgi?id=41868 patch
I still need to write a couple of tests, but I think the attached patch is the correct fix.