On the homotopy index for infinite-dimensional semiflows