Corrected key check for attributes to allow record attributes to be modified