Here is debug.log contents. Installed Bitcoin Core 0.15.1 and started it up. Set the options and edited bitcoin.conf to add pruning. Then closed, replaced wallet.dat with problematic one and started Bitcoin-qt.exe with -upgradewallet option. Gave me the same error.
2018-02-10 11:59:52
2018-02-10 11:59:52 Bitcoin version v0.15.1
2018-02-10 11:59:52 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2018-02-10 11:59:52 Assuming ancestors of block 0000000000000000003b9ce759c2a087d52abc4266f8f4ebd6d768b89defa50a have valid signatures.
2018-02-10 11:59:52 Setting nMinimumChainWork=000000000000000000000000000000000000000000723d3581fe1bd55373540a
2018-02-10 11:59:52 Using the 'standard' SHA256 implementation
2018-02-10 11:59:52 Using RdRand as an additional entropy source
2018-02-10 11:59:53 GUI: "registerShutdownBlockReason: Successfully registered: Bitcoin Core didn't yet exit safely..."
2018-02-10 11:59:53 Default data directory C:\Users\Admin\AppData\Roaming\Bitcoin
2018-02-10 11:59:53 Using data directory C:\Users\Admin\AppData\Roaming\Bitcoin
2018-02-10 11:59:53 Using config file C:\Users\Admin\AppData\Roaming\Bitcoin\bitcoin.conf
2018-02-10 11:59:53 Using at most 125 automatic connections (2048 file descriptors available)
2018-02-10 11:59:53 Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2018-02-10 11:59:53 Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2018-02-10 11:59:53 Using 0 threads for script verification
2018-02-10 11:59:53 init message: Verifying wallet(s)...
2018-02-10 11:59:53 Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010)
2018-02-10 11:59:53 Using wallet wallet.dat
2018-02-10 11:59:53 CDBEnv::Open: LogDir=C:\Users\Admin\AppData\Roaming\Bitcoin\database ErrorFile=C:\Users\Admin\AppData\Roaming\Bitcoin\db.log
2018-02-10 11:59:53 Cache configuration:
2018-02-10 11:59:53 * Using 2.0MiB for block index database
2018-02-10 11:59:53 * Using 8.0MiB for chain state database
2018-02-10 11:59:53 * Using 440.0MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)
2018-02-10 11:59:53 init message: Ielādē bloku indeksu...
2018-02-10 11:59:53 Opening LevelDB in C:\Users\Admin\AppData\Roaming\Bitcoin\blocks\index
2018-02-10 11:59:53 scheduler thread start
2018-02-10 11:59:53 Opened LevelDB successfully
2018-02-10 11:59:53 Using obfuscation key for C:\Users\Admin\AppData\Roaming\Bitcoin\blocks\index: 0000000000000000
2018-02-10 11:59:53 LoadBlockIndexDB: last block file = 0
2018-02-10 11:59:53 LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=0, size=0, heights=0...0, time=1970-01-01...1970-01-01)
2018-02-10 11:59:53 Checking all blk files are present...
2018-02-10 11:59:53 LoadBlockIndexDB: transaction index disabled
2018-02-10 11:59:53 Initializing databases...
2018-02-10 11:59:53 Pre-allocating up to position 0x1000000 in blk00000.dat
2018-02-10 11:59:53 Opening LevelDB in C:\Users\Admin\AppData\Roaming\Bitcoin\chainstate
2018-02-10 11:59:53 Opened LevelDB successfully
2018-02-10 11:59:53 Wrote new obfuscate key for C:\Users\Admin\AppData\Roaming\Bitcoin\chainstate: 8ccea2ae22e7c058
2018-02-10 11:59:53 Using obfuscation key for C:\Users\Admin\AppData\Roaming\Bitcoin\chainstate: 8ccea2ae22e7c058
2018-02-10 11:59:53 init message: Rewinding blocks...
2018-02-10 11:59:53 block index 3ms
2018-02-10 11:59:53 init message: Ielādē maciņu...
2018-02-10 11:59:53 nFileVersion = 150100
2018-02-10 11:59:53 Keys: 0 plaintext, 0 encrypted, 0 w/ metadata, 0 total
2018-02-10 11:59:53 Performing wallet upgrade to 60000
2018-02-10 11:59:54 keypool added 2000 keys (1000 internal), size=2000 (1000 internal)
2018-02-10 11:59:54 keypool reserve 1
2018-02-10 11:59:54 keypool keep 1
2018-02-10 11:59:54 wallet 1139ms
2018-02-10 11:59:54 keypool added 1 keys (0 internal), size=2000 (1000 internal)
2018-02-10 11:59:54 setKeyPool.size() = 2000
2018-02-10 11:59:54 mapWallet.size() = 0
2018-02-10 11:59:54 mapAddressBook.size() = 1
2018-02-10 11:59:54 UpdateTip: new best=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f height=0 version=0x00000001 log2_work=32.000022 tx=1 date='2009-01-03 18:15:05' progress=0.000000 cache=0.0MiB(0txo)
2018-02-10 11:59:54 mapBlockIndex.size() = 1
2018-02-10 11:59:54 nBestHeight = 0
2018-02-10 11:59:54 Failed to open mempool file from disk. Continuing anyway.
2018-02-10 11:59:54 torcontrol thread start
2018-02-10 11:59:54 Bound to [::]:8333
2018-02-10 11:59:54 Bound to 0.0.0.0:8333
2018-02-10 11:59:54 init message: Loading P2P addresses...
2018-02-10 11:59:54 ERROR: DeserializeFileDB: Failed to open file C:\Users\Admin\AppData\Roaming\Bitcoin\peers.dat
2018-02-10 11:59:54 Invalid or missing peers.dat; recreating
2018-02-10 11:59:54 init message: Loading banlist...
2018-02-10 11:59:54 ERROR: DeserializeFileDB: Failed to open file C:\Users\Admin\AppData\Roaming\Bitcoin\banlist.dat
2018-02-10 11:59:54 Invalid or missing banlist.dat; recreating
2018-02-10 11:59:54 init message: Starting network threads...
2018-02-10 11:59:54 net thread start
2018-02-10 11:59:54 dnsseed thread start
2018-02-10 11:59:54 Loading addresses from DNS seeds (could take a while)
2018-02-10 11:59:54 addcon thread start
2018-02-10 11:59:54 opencon thread start
2018-02-10 11:59:54 msghand thread start
2018-02-10 11:59:54 init message: Ielāde pabeigta
2018-02-10 11:59:54 GUI: Platform customization: "windows"
2018-02-10 11:59:54 GUI: PaymentServer::LoadRootCAs: Loaded 8 root certificates
2018-02-10 11:59:56 receive version message: /Satoshi:0.14.2/: version 70015, blocks=508507, us=212.3.196.61:49166, peer=0
2018-02-10 11:59:57 receive version message: /Satoshi:0.15.1/: version 70015, blocks=508507, us=212.3.196.61:49168, peer=1
2018-02-10 11:59:58 receive version message: /Satoshi:0.16.0/: version 70015, blocks=508507, us=212.3.196.61:49169, peer=2
2018-02-10 11:59:59 138 addresses found from DNS seeds
2018-02-10 11:59:59 dnsseed thread exit
2018-02-10 12:00:02 GUI: OpenType support missing for script 12
2018-02-10 12:00:02 GUI: OpenType support missing for script 12
2018-02-10 12:00:02 GUI: OpenType support missing for script 12
2018-02-10 12:00:02 GUI: OpenType support missing for script 12
2018-02-10 12:00:02 GUI: OpenType support missing for script 12
2018-02-10 12:00:02 GUI: OpenType support missing for script 12
2018-02-10 12:00:02 GUI: OpenType support missing for script 12
2018-02-10 12:00:02 GUI: OpenType support missing for script 12
2018-02-10 12:00:02 GUI: OpenType support missing for script 12
2018-02-10 12:00:02 GUI: OpenType support missing for script 11
2018-02-10 12:00:02 GUI: OpenType support missing for script 11
2018-02-10 12:00:02 GUI: OpenType support missing for script 11
2018-02-10 12:00:02 GUI: OpenType support missing for script 11
2018-02-10 12:00:02 GUI: OpenType support missing for script 11
2018-02-10 12:00:02 GUI: OpenType support missing for script 11
2018-02-10 12:00:02 GUI: OpenType support missing for script 11
2018-02-10 12:00:02 GUI: OpenType support missing for script 20
2018-02-10 12:00:02 GUI: OpenType support missing for script 20
2018-02-10 12:00:02 GUI: OpenType support missing for script 20
2018-02-10 12:00:02 GUI: OpenType support missing for script 20
2018-02-10 12:00:02 GUI: OpenType support missing for script 20
2018-02-10 12:00:02 GUI: OpenType support missing for script 20
2018-02-10 12:00:02 GUI: OpenType support missing for script 20
2018-02-10 12:00:02 GUI: OpenType support missing for script 16
2018-02-10 12:00:02 GUI: OpenType support missing for script 16
2018-02-10 12:00:02 GUI: OpenType support missing for script 16
2018-02-10 12:00:02 GUI: OpenType support missing for script 16
2018-02-10 12:00:02 GUI: OpenType support missing for script 16
2018-02-10 12:00:02 GUI: OpenType support missing for script 16
2018-02-10 12:00:02 GUI: OpenType support missing for script 16
2018-02-10 12:00:02 GUI: OpenType support missing for script 17
2018-02-10 12:00:02 GUI: OpenType support missing for script 17
2018-02-10 12:00:02 GUI: OpenType support missing for script 17
2018-02-10 12:00:02 GUI: OpenType support missing for script 17
2018-02-10 12:00:02 GUI: OpenType support missing for script 17
2018-02-10 12:00:02 GUI: OpenType support missing for script 17
2018-02-10 12:00:02 GUI: OpenType support missing for script 17
2018-02-10 12:00:28 ProcessMessages(version, 113 bytes) FAILED peer=3
2018-02-10 12:00:43 upnp thread start
2018-02-10 12:00:45 No valid UPnP IGDs found
2018-02-10 12:00:45 upnp thread exit
2018-02-10 12:00:46 tor: Thread interrupt
2018-02-10 12:00:46 net thread exit
2018-02-10 12:00:46 torcontrol thread exit
2018-02-10 12:00:46 scheduler thread interrupt
2018-02-10 12:00:46 Shutdown: In progress...
2018-02-10 12:00:46 addcon thread exit
2018-02-10 12:00:46 msghand thread exit
2018-02-10 12:00:47 opencon thread exit
2018-02-10 12:00:47 Dumped mempool: 0s to copy, 0s to dump
2018-02-10 12:00:48 Shutdown: done
2018-02-10 12:02:20
2018-02-10 12:02:20 Bitcoin version v0.15.1
2018-02-10 12:02:20 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2018-02-10 12:02:20 Assuming ancestors of block 0000000000000000003b9ce759c2a087d52abc4266f8f4ebd6d768b89defa50a have valid signatures.
2018-02-10 12:02:20 Setting nMinimumChainWork=000000000000000000000000000000000000000000723d3581fe1bd55373540a
2018-02-10 12:02:20 Prune configured to target 4096MiB on disk for block and undo files.
2018-02-10 12:02:20 Using the 'standard' SHA256 implementation
2018-02-10 12:02:20 Using RdRand as an additional entropy source
2018-02-10 12:02:21 GUI: "registerShutdownBlockReason: Successfully registered: Bitcoin Core didn't yet exit safely..."
2018-02-10 12:02:21 Default data directory C:\Users\Admin\AppData\Roaming\Bitcoin
2018-02-10 12:02:21 Using data directory C:\Users\Admin\AppData\Roaming\Bitcoin
2018-02-10 12:02:21 Using config file C:\Users\Admin\AppData\Roaming\Bitcoin\bitcoin.conf
2018-02-10 12:02:21 Using at most 125 automatic connections (2048 file descriptors available)
2018-02-10 12:02:21 Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2018-02-10 12:02:21 Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2018-02-10 12:02:21 Using 0 threads for script verification
2018-02-10 12:02:21 init message: Verifying wallet(s)...
2018-02-10 12:02:21 Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010)
2018-02-10 12:02:21 Using wallet wallet.dat
2018-02-10 12:02:21 CDBEnv::Open: LogDir=C:\Users\Admin\AppData\Roaming\Bitcoin\database ErrorFile=C:\Users\Admin\AppData\Roaming\Bitcoin\db.log
2018-02-10 12:02:21 Cache configuration:
2018-02-10 12:02:21 * Using 2.0MiB for block index database
2018-02-10 12:02:21 * Using 8.0MiB for chain state database
2018-02-10 12:02:21 * Using 440.0MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)
2018-02-10 12:02:21 init message: Loading block index...
2018-02-10 12:02:21 Opening LevelDB in C:\Users\Admin\AppData\Roaming\Bitcoin\blocks\index
2018-02-10 12:02:21 scheduler thread start
2018-02-10 12:02:22 Opened LevelDB successfully
2018-02-10 12:02:22 Using obfuscation key for C:\Users\Admin\AppData\Roaming\Bitcoin\blocks\index: 0000000000000000
2018-02-10 12:02:24 LoadBlockIndexDB: last block file = 0
2018-02-10 12:02:24 LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=1, size=293, heights=0...0, time=2009-01-03...2009-01-03)
2018-02-10 12:02:24 Checking all blk files are present...
2018-02-10 12:02:24 LoadBlockIndexDB: transaction index disabled
2018-02-10 12:02:24 Opening LevelDB in C:\Users\Admin\AppData\Roaming\Bitcoin\chainstate
2018-02-10 12:02:24 Opened LevelDB successfully
2018-02-10 12:02:24 Using obfuscation key for C:\Users\Admin\AppData\Roaming\Bitcoin\chainstate: 8ccea2ae22e7c058
2018-02-10 12:02:24 Loaded best chain: hashBestChain=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f height=0 date=2009-01-03 18:15:05 progress=0.000000
2018-02-10 12:02:24 init message: Rewinding blocks...
2018-02-10 12:02:24 init message: Verifying blocks...
2018-02-10 12:02:24 block index 2855ms
2018-02-10 12:02:24 init message: Loading wallet...
2018-02-10 12:02:24 nFileVersion = 90300
2018-02-10 12:02:24 Keys: 104 plaintext, 0 encrypted, 0 w/ metadata, 104 total
2018-02-10 12:02:24 Performing wallet upgrade to 60000
2018-02-10 12:02:24 wallet 31ms
2018-02-10 12:02:24
************************
EXCEPTION: St13runtime_error
GenerateNewKey: AddKey failed
C:\Program Files\Bitcoin\bitcoin-qt.exe in Runaway exception
2018-02-10 12:02:30 CDBEnv::EnvShutdown: Error -30974 shutting down database environment: DB_RUNRECOVERY: Fatal error, run database recovery