Windows: fix various npipe bugs Upstream-commit: 3221c7a3c6367c3223c0e1b82b3de7adbbca8651 Component: engine