Fix handling of pooled org identities when calculating co id (CO-853)