Fix hierarchical listing for multiple levels and when including root