CRM-13027 - Fix handling of custom-data in getfields API