Added check for implicit global variable declaration