backported: better old session detection. related #1293