Demonstration of the wrong way to use globals in lambda functions