Move child part adding to end of field definitions to prevent NPEs. Untidy, but fixes #21.