Correctly handle virtual related fields.