Fix NPE when adding name to UUID key before the name has been set.