complete fixes to make dynamic enable/disable of dup detection work completely