fixed primary key creation for ReferenceSets