The previous change is wrong. 

When the upsert statement does not specify any column nodes, the pkColumnIdx assumes to start with 0. Under the case when Salting column is present, it should start with 1 instead of 0.