Faster implementation of StateMachine.IsComplete and OrthogonalState.IsComplete