Correcting how keys for record versions are generated