In order to enforce the Local/LocalState restriction of usage we are relying heavily on inspect which is a very slow call. This call is done once in orchestration and can be ignore. But under stencil operations, it will be done every single call which will lead to performance degradation.
Potential solution:
- cache access after the first one
- unhook guardrails after the first check
- unhook guardrails in "performance" mode