KT4674 Move lambda

Fix to this report [KT-4674](http://youtrack.jetbrains.com/issue/KT-4674) (relates to #383, #390, #380, #403)