Stop ongoing transitions when we enter a new context.

A minor performance improvement, which also prevents the side-effects
of the new code being surrounded by old transitions.