more strict common ancestor check