Fix crash happening if item_template.StatsCount field in the database was higher than 10. Fixes #15868