Prevent companies with the same domain from creating duplicates

Hi,

What if I merge 2 related companies with different domains together ? Is there a way to set it that secondary company in the merge cannot then be added as a new company entirely?