fix Issue 9834 - incorrect detection of lambda locality.
Merge pull request #1817 from 9rnsr/fix9834

[REG2.063] Issue 9834 - incorrect detection of lambda locality.