Fix possible crash when logging out, with "don't keep activities"

Bug: 66688
Change-Id: Ib45069b75ec4912c333c1203e49b9e101ed9f138