Duplicate detection for custom variables