Fix conflict between UAE thread and timer thread when requesting global lock