Remove last duplicate unset
Merge pull request #5817 from lucasmichot/4.2-duplicate-unset

[4.2] Database : remove last duplicate unset