Simplify matcher-recurse by using internal recursion.