Optimization: Minimize refreshing when root context changes