When a firmware restart is done, don't try to reprogram the keys to new
slots but rather just keep the old key index, while skipping keys that
weren't programmed before.
Not only does this restore the state more faithfully, but it will also
allow using the HW key index for internal purposes as an array index.