My experience is that this wouldn't work. Chanserv would give & and @ status at the same time like +ao nick nick, and it would be even more convoluted during the rejoin after a netsplit.
But this code will only be used to count the nicknames to whom I give the +a mode or remove it. In case of a netsplit, if I am not the nick, applying the modes will not affect me.