[PATCH] Keys: Fix race between two instantiators of a key