Added semantic checking for Record and Array vars.