respect inheritance when looking for sub to export