Issue 1763

Fixes #1763
(or more accurately it will when it is ok)

Replaces closed pull request #2286.
Ok, but then what do we do when 'set_instead_of_inc' is True?