Cannot understand the rules in maxima (maxima hanging on few rule applications)



(%i1) sumexpand:false,
   matchdeclare([_i,_k,_f,_e],all),
   apply(defrule,[s1,sum(_f(_i),_i,1,_k),S(_f)]),
   apply(defrule,[s2,_e*sum(_f(_i),_i,1,_k),_e*S(_f)])
(%i4) apply1(sum(f(i),i,1,n),s1);
(%o4) S(f)
(%i5) apply1(sum(f(i),i,1,n),s2);
.... hang...

Could you please tell me the reason why rule s2 is hanging while s1 is
running ok?

Thanks,
Dileep