product should return 1 if term=1, fixes #8301
doit() keeps unevaluated Product, if _eval_product returned nan
Merge pull request #8304 from skirpichev/8301-fix

product should return 1 if term=1