Fix crash on startup in flatpack backend
Capturing in coroutine lambdas is dangerous, because they can get destroyed before they are finished. Instead pass the captures as arguments. See also the comment in deferredResultStream
Edited by David Redondo