Fixed the duplicateValueCheck.js snippet to actually work.