Factorise st->nb_index_entries check.