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