[Debugger] Fixed frame index accounting in StackTracePad

We can't use the TreePath to get the frame index because
we hide some frames.