Local keyboard gets messed up if locked running TV session

I use TV with a Win7 local PC to log into both Win7 and Win10 remote PC's.

Here's what happens with some frequency:

*I have a remote TV session running, minimized or behind other applications I have open on my local PC.
*I lock the windows session using the WinKey+"L" combination (or perhaps it self-locks upon some set period of keyboard/mouse inactivity).
*After some time, I unlock the session
*At this point, pressing certain alpha-keys will launch other programs or trigger weird windows functions on the local PC.

This failure mode has been going on for several revs of TV.  Makes it tough to save ones work when you can't even type complete file names! Closing TV after the keyboard goes berserk won't fix it.

Restarting the PC will restore keyboard functionality, but the only sure way I know to prevent this is to remember to close remote sessions before leaving my PC unattended or locking the screen.

I recall years ago, I tried a hack I found Googling this issue to restore keyboard function without restarting: it involved adding an alternative key map to Windows, re-mapping the keys to said alternate language, and remapping back to US-keyboard. Haven't been able to find the details of this again.

Is there anything I can do to systematically prevent this or to more gracefully survive it without having to close all open applications on the local windows PC to restart it?