dialog: proper detection of keepalive flag for destination

- credit to Bill Radis, FS#416, for report and fix

(cherry picked from commit 933a621f40eaa31b193e76f162f9cc016b49aeac)