StackContext performance optimization

With stack deactivation removed.