Detect double declarations

The compiler passes would ignore multiple declarations of a references within the same block:

    var foo = 1
    var foo = 2

The problem would only be detected at bytecode-generation time with ASM throwing out-of-bounds
exceptions.

This commit provides a fix for that. It also introduces the marking of local references as
synthetic, like those generated for loop iterators. This is used in the problem detection since
these variables behave marginally differently from those defined by programmers.