Windows: fix locking hierarchy in service