I can't figure this out



I am trying to fix the noninteractive.mac to do the simplify better and it only sort of works.

(%i1) load(noninteractive);
(%o1) C:/Maxima-5.16.3/share/maxima/5.16.3/share/contrib/noninteractive/noninteractive.mac
(%i2) matchdeclare([aa,bb,cc],true);
(%o2) done
(%i3) tellsimp(if aa then bb elseif cc then bb, if aa or cc then bb);
(%o3) merror(Circular rule attempted - `tellsimp')
(%i4) declare([m,n],integer);
(%o4) done
(%i5) assume(n>0,m>0,not equal(n,m));
(%o5) [n>0,m>0,notequal(n,m)]
(%i6) integrate(sin(m*x)*sin(n*x),x,0,2*%pi);
(%o6) if n-m<0 then 0 elseif n-m>0 then 0 
(%i7) matchdeclare([aa,bb,cc],true);
(%o7) done
(%i8) tellsimp(if aa then bb elseif cc then bb, if aa or cc then bb);
(%o8) merror(Circular rule attempted - `tellsimp')
(%i9) integrate(sin(m*x)*sin(n*x),x,0,2*%pi);
(%o9) 0

Why is %o6 different than %o9?  I can't figure it out.  It works the second time but not the first and the second time is not quite what I expected either.  I get an error too.  I also uncommented out the code in noninteractive that does a lot of collapsing of conditionals.

Rich