The light flashed because the PCM can detect that the circuit is grounded when it doesn't want it to be grounded.
Do I understand this? With the switch on it does what you want, right? If so, the problem is your tuning. It just isn't asking for lock when you want it to be locked.