The problem is that the line

`if (definition && options.upsert && attrs[definition.idAttribute]) {`

runs before

`options = DSUtils._(definition, options);`

so the options don't get merged with the global options. This is a suggested fix.
Even better. These changes make it work. ＼(＾O＾)／  Can't say as much for the tests though... (◞‸◟；)
Merge branch 'upsert-suggested-fix' into temp-built
Build with upsert fix