Application of a693af4 (Adds fix for race condition where primary keys are violated on INSERT) from doIncrementUpdateOrInsert to doSetUpdateOrInsert
Merge branch 'release/2.1'