I have been slowly working toward supporting variables that can be declared/updated during output generation. This code also cleans up the code for searching within a scope.
Instead of context data being a single object, it now supports the same scoping rules as keys. Now the #index tag is always available.