Detectability of hierarchical communities in networks