FIX: flattening export trees