Unset fields if no nested fields are defined

This fixes #495