Merge "Fix handling of lost device" into jb-mr1-dev