Fix type of custom `fields` in thirdparty lookup queries.