Don't lose focus after mapping a control.

Makes it a lot less aggravating to remap more than one control using a controller.

Also fixes a race condition.