The fix is to store the handle from WSAAsyncGetHostByName so that it can be cancelled in NETSHUTDOWN if it hasn't yet completed. This fix was probably always needed, but it became more apparent recently as the network tests started to deadlock on a call to NETSHUTDOWN when all tests were run.
I expect that this fixes the real root cause of Bug #307.