Calling ThreadFlushWalletDB makes not much sense if an explicit flush is required. The function will return immediately because of the fOneThread (populated/thread started during AppInit).
Removing it for now.
Good catch. A shame we didn't catch this in the review. Calling into another thread's main function is 100% of times a mistake. utACK https://github.com/bitcoin/bitcoin/pull/8765/commits/c6f5ca822f1308983431bf1b3c91f8aaccff51a0
utACK c6f5ca8
utACK
Backport for 0.13.1?