Wrote a better testcase, found a bug, and fixed it

The filter composed in opposite direction from call stack,
that is `f∘g` became g(f(x)) instead of the correct f(g(x))