Fixed an issue with custom fields being incorrectly converter to API fields and losing their 'custom' status.