EDOC-1618: use mapped type id for duplication check