product should return 1 if term=1

fixes #8301