Fix error "not an identifier" when getting number of parents