Fixed a bug that allowed an id to be declared multiple times in the same scope