Fixing check for invalid column reference in primary key constraint to take into account salting