Fix bug when checking lambda expressions for variables declared as both parameters and free