wm->modname might be invalid at the end of FreeLibrary.