This is fixed upstream in https://source.winehq.org/git/wine.git/commit/3d824d11dbde45299963a758b97d1e417dca36e0