Fix bug in compiler.toLambda