Added support for compile time testing of whether a variable is declared
in a local scope.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>