Added test for making sure that lambdas do not mutate scalar values in outer scope that have been passed as arguments.