Fix latent bug in registry save code.