This code shows the issue:
%assign %$loc1 1
; Why is %$loc1 still defined as 1 here? Shouldn't it be bound to the current context?
; It seems like it's "falling through" when a context-local variable doesn't exist.
; Is this the desired behaviour?
%assign %$loc1 0
; Here %$loc1 is 1 again, as expected.
test.asm:2: warning: %$loc1
test.asm:6: warning: 1
test.asm:12: warning: 1 <- wrong (?)
test.asm:16: warning: 0
test.asm:20: warning: 1