win32: inhibit: Ensure we restore the state when cancelled