Note to self: always check whether variable you have captured implicitly by
reference in lambda that is going to be passed to scope guard is going
to be changed before scope exit or not.