Fix bug in lambda generation whereby lambda local variables had incorrect offsets.