dialog: reset local variables shortcuts after reply and failure processing

- avoid using wrong values to find dialogs with processing of next messages
- reported by Julia Boudniatsky

(cherry picked from commit dcdb73d792719e38844eef60f821365b587893d7)