Fix initialization of same_node_ in TreeEnsemble (#24654)
### Description
For TreeEnsemble, onnxruntime tries to fuse multiple nodes BRANCH_EQ
into one node BRANCH_MEMBER. When a tree only contains BRANCH_EQ nodes,
the final tree could be a mix between BRANCH_EQ and BRANCH_MEMBER. To be
more efficient, onnxruntime detects that all the nodes use the same rule
and avoids checking that value for every node while getting the final
leaf. This detection happened before the fusion into BRANCH_MEMBER. This
PR detects that this check must be done again. This extra cost only
happens when a tree only contains nodes BRANCH_EQ and should not be
much. It only happens during the initialization.
### Motivation and Context
Fixes issue #24636.
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>