updated Locals analysis to handle global keyword

Whenever a variable with the global keyword is assigned too,
we don't add it to the locals