Transitions starting in random poses when using various sub-machines

Hello, fellow Uniters. I have lately run into a very strange issue with a complex animator, where I have various sub-state machines.
The idea is simple: I am in a substate machine, doing a cycle of random animations, until a trigger is set and I jump to another state.
But something is happening to transitions. Sometimes, when the trigger is set, the transition is done nicely. But the rest of the time, the rig “jumps” to a completely random pose, and then make the transition.
It’s very strange, because the transition is indeed happening, but not from the expected pose.
I presume this is happening due to a bad configuration, where it somewhat stores some previous pose, and doesn’t get to clean it when making another transition.
But I can’t put my finger on why this is happening, it’s the first time I see this behavior.
This is the animator main tree, with a random transition selected:

And this is one of the sub-machines (the exit transitions have just “has exit time” activated with no conditions). When a sub-machine finishes, if no trigger has been set, a script selects a random number, and the sub-machine transitions to itself, but in a different state. This seems to work always fine.

This is an example where everything works fine:

But after a while, transitions start to get choppy:

See that, before making the transition, the pose jumps to something completely random?

I initially thought it could be a problem of trying to run a transition while already doing one, but I changed the Interruption Source and make sure I was not in the middle of any transition and still happening.

Any hint on what the problem could be?

Solved! The culprit here was the Cycle Offset, which was linked to a random parameter we set each time a state was entered. That’s why the behaviour was, indeed, inconsistent.