Improve duplicate segment match detection.