OVT-7280: Prevent deletion of codes relations

If there is a code element relation between code elements in codes, then
deleting codes relation is prevented.