Avoid recursively calling transitionTo.