use equals() rather than reference equality for excluding ourselves from the dependency builder

patch by Benedict; reviewed by Caleb Rackliffe for CASSANDRA-18218
diff --git a/accord-core/src/main/java/accord/messages/PreAccept.java b/accord-core/src/main/java/accord/messages/PreAccept.java
index 9b171f0..8426cb7 100644
--- a/accord-core/src/main/java/accord/messages/PreAccept.java
+++ b/accord-core/src/main/java/accord/messages/PreAccept.java
@@ -232,7 +232,7 @@
         commandStore.mapReduce(keys, ranges, testKind, STARTED_BEFORE, executeAt, ANY_DEPS, null, null, null,
                 (keyOrRange, testTxnId, testExecuteAt, in) -> {
                     // TODO (easy, efficiency): either pass txnId as parameter or encode this behaviour in a specialised builder to avoid extra allocations
-                    if (testTxnId != txnId)
+                    if (!testTxnId.equals(txnId))
                         in.add(keyOrRange, testTxnId);
                     return in;
                 }, builder, null);