fix listRankSpecificRootNodes behavior for ranks in between and some