Calculate common ancestor on server.