Fix isuniquevalue with pk not internalid