Simplified duplicate node detection