exportlegends exports objects of type historical_event_relationship_supplements using XML elements of occasion_type and site for DF's circumstance and circumstance_id fields. In reality, the field being exported as site is only valid for certain circumstances and is never a site.
The script should, realistically, only export the circumstance_id field for the circumstances for which it is valid, and should use an XML element appropriate for the specific type of thing the circumstance_id is referring to. It should probably also call tghe event a circumstance (instead of an occasion_type).
All this needs to be evaluated for the potential impact on downstream tools.