Implemented semantic checking for duplicated variable declarations