As you can see in your example, your gradients don’t match in the third column which is exactly the oclumn that has duplicatevalues. With one version putting grad on the top 7 and the other one on the bottom 7 so looks like this is what happens (and is expected behavior!)