Possible matchdeclare/lambda expression/ruledef bug



I'm still pretty new to writing rules, so this might not be a bug.

(%i1) matchdeclare(zz, lambda([x], freeof("+", dispform(x,all))))$
(%i2) matchdeclare(yy, atom)$
(%i3) defrule (r1, zz + yy, ["Free of addition" = zz, yy = "yy",
freeof("+", dispform(zz, all)) ] )$
(%i4) r1(z+y);

(%o4) ["Free of addition"=z+y,0="yy",false]

I do not know how "zz" matches "z+y," but yet the lambda expression
declares "zz" as free of addition. Notice how "zz" fails its check (the
third element in the output).

Other examples from the above include:
(%i5) defrule (r4, zz, "Free of + for " = zz)$
(%i6) r4(z*y);
(%i7) r4(z+y);

(%o6) "Free of + for "=y*z
(%o7) false

Sometimes zz matches/fails correctly, as rule 4 demonstrates. I am baffled
by this behavior. It kind of feels like a bug, but I've not worked with
writing rules enough to be sure.