Merge "Fix bug in checking getLastLocation identities" into tm-dev