A bug in simplify fixed

Previously `simplify(Sum(i, (i, a, b))*Sum(i**2, (i, a, b)))` returned `Sum(i**2, (i, a, b))`.
A bug fix for the similar scenarios.