Doing some performance improvements around wrapping context.