Fix Issue 10311 - GDB prints wrong value for variable updated from closure

Signed-off-by: Martin Krejcirik <mk@krej.cz>