Bugfix: prevent errors when attempting to export empty hierarchies