These changes are needed for the lambdas implementation. Co-authored-by: Samuel Gélineau <gelisam@gmail.com>