ml-matches: fix table scan ordering for fast-path (#38369)
With the "ndisjoint" fast-path, we need to fully verify each item before
considering the next. This ensures we do not over count the number of
matches after consideration of ambiguities. It also lets us count the
disjoint cases less conservatively, and leads to a minor speed up when
computing certain ambiguities.
Fixes #38280