This is being emitted with [GCC 10.2.1](https://packages.debian.org/bullseye/g++-arm-linux-gnueabihf), in some CI jobs: i.e https://github.com/bitcoin/bitcoin/pull/25972/checks?check_run_id=12423693655, or https://github.com/bitcoin/bitcoin/pull/25972/checks?check_run_id=12423693651 (where we actually turn on all our warning flags with depends builds).
```bash
In file included from test/miniscript_tests.cpp:19:
./script/miniscript.h:1197:71: error: comparison of integers of different signs: 'typename iterator_traits<int *>::difference_type' (aka 'int') and 'const uint32_t' (aka 'const unsigned int') [-Werror,-Wsign-compare]
                    return std::count(subs.begin(), subs.end(), true) >= node.k;
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~
test/miniscript_tests.cpp:346:34: note: in instantiation of function template specialization 'miniscript::Node<CPubKey>::IsSatisfiable<(lambda at test/miniscript_tests.cpp:346:48)>' requested here
        bool satisfiable = node->IsSatisfiable([](const Node&) { return true; });
                                 ^
1 error generated.
```

cc @darosior 
* result can be thought of as first using downfn to compute a "state" for each node,
     * from the root down to the leaves. Then upfn is used to compute a "result" for each
     * node, from the leaves back up to the root, which is then returned. In the actual
     * implementation, both functions are invoked in an interleaved fashion, performing a
     * depth-first traversal of the tree.
     *
     * In more detail, it is invoked as node.TreeEvalMaybe<Result>(root, downfn, upfn):
     * - root is the state of the root node, of type State.
     * - downfn is a callable (State&, const Node&, size_t) -> State, which given a
     *   node, its state, and an index of one of its children, computes the state of that
     *   child. It can modify the state. Children of a given node will have downfn()
     *   called in order.
     * - upfn is a callable (State&&, const Node&, Span<Result>) -> std::optional<Result>,
     *   which given a node, its state, and a Span of the results of its children,
     *   computes the result of the node. If std::nullopt is returned by upfn,
     *   TreeEvalMaybe() immediately returns std::nullopt.
     * The return value of TreeEvalMaybe is the result of the root node.
     *
     * Result type cannot be bool due to the std::vector<bool> specialization.
     */
    template<typename Result, typename State, typename DownFn, typename UpFn>
    std::optional<Result> TreeEvalMaybe(State root_state, DownFn downfn, UpFn upfn) const
    {
        
        struct StackElem
        {
            const Node& node; 
            size_t expanded; 
            State state; 
            StackElem(const Node& node_, size_t exp_, State&& state_) :