Optimized dynamic scoping a bit more