Fix issue 3174: do substitution first in evalf_sum()

    N.b.: XFAILed test was changed due to adoption of
    the Karr convention for summation.
Merge pull request #2408 from skirpichev/3174-sum-evalf

Fix issue 3174: do substitution first in evalf_sum()