inShutdown() becomes true rather late in the shutdown procedure. Among potentially other issues, it comes after we close our listening sockets which can trigger fatal assertion 16727.
As an example search for "Fatal Assertion 16727" in http://buildlogs.mongodb.org/mci_0.9_windows-64-debug/builds/66149/test/aggregation_0/testshard1.js
I think inShutdown must become true before we begin any shutdown-related activities. This may require decoupling it from the numExitCalls counter.
There's also a race condition with the listener thread exiting before the _exit call from a previous exitClean call completing, which causes the server to exit with return code 48 (EXIT_NET_ERROR).