This fixes bug http://bugs.winehq.org/show_bug.cgi?id=18425. Bug contains a simple test case for this problem - a dll and exe that tries to load it. Changelog: - call DLL_PROCESS_DETACH if attaching failed