Fix series index check

The size of 'core' at that point in setId is 0, so use 'seriesCount'
instead.