I don't understand Wine's named pipe or completion implementations, but I can at least explain what the test is observing.
http://test.winehq.org/data/566cb8c7a32f6128ae7d05f7fab30db08ba64ea4/wine_ae...
ConnectNamedPipe is setting ERROR_ALREADY_CONNECTED, but it's also notifying the completion. In my testing on Windows, the completion was never notified in this case (we don't have any tests on test.winehq.org showing this yet, or I'd link one).
http://test.winehq.org/data/566cb8c7a32f6128ae7d05f7fab30db08ba64ea4/wine_ms...
Here ConnectNamedPipe is setting ERROR_IO_PENDING, the client is connecting, but the completion is never notified.
Vincent Povirk