Changes in StateVertexImpl to implement near-duplicates