This seems never to be used. Probably the entire `entityKeys` map could be removed.