Fix problem with key caching in the serial gateway firmware