Win32: fix recursive locking imbalance