Merge "Allow revoked capabilities to be restored in sharedUserId lineage" into tm-dev