I think maybe this is template bug. These code doesn't compile from @zielmicha.
template bar() {.dirty.} =
echo a
template foo() =
let a = 5
bar()
foo()
But when we turn foo into proc, the code works.
template bar() {.dirty.} =
echo a
proc foo() =
let a = 5
bar()
foo()
So it is doesn't matter if the foo is hygienic or not.
