I think I would probably add one or two more tests here... one where your outermost clause is an "or", and then you have some "ands" inside of that, and you only add the last-run filter to one of the two branches of the tree.

And then another one (or maybe you could do this in the same test) where you are doing "last-run=false" on one branch and "last-run=true" on the other.