Fix lambda capture 'this' is not used
(cherry picked from commit 4e15b1fdd58f2e21a9b52edb21d3bbde6a836e3d)