Fixes T12409. Config entries may be marked as "deleted", and bin/config set --database doesn't un-delete them, so the edit doesn't do anything.
The "most correct" fix here is to swap to transactions so we run the same code, but just fix this narrowly for now since it's one line of code.