WELD-1496 Optimize context activation/deactivation events