gh120: fix stack overslow when terminating debugged node