Rather than testing object identity, test equality of primary keys in cycle constraints