this is not perfect (denovos should not be compound with themselves) but works in most cases