Core: More work for to make Local variable scoping work correctly.
Trig: Further work to get trig working with variable scoping.