This also gets rid of variable shadowing related to the lambda parameter a little bit below this code as well.