Merge changes I28f673b6,I146f7cfd into main

* changes:
  Flag for import of previously-emulated keys
  Cope with previously-emulated keys