Submitting this because I dont have the time (or resources) to debug this atm and need a self-reminder:
On Win32 walletpassphrase does not appear to relock after the designated amount of time as it should and as it does on Linux.
Can someone check this on OSX as well?

{
    std::set<uint256> result;
    AssertLockHeld(cs_);
    std::map<uint256, CWaetTx>::const_iterator it = mapWaet.find(txid);
    if (it == mapWaet.end())
        return result;
    const CWaetTx& wtx = it->second;
    std::pair<TxSpends::const_iterator, TxSpends::const_iterator> range;
    for (const CTxIn& txin : wtx.tx->vin)
    {
        if (mapTxSpends.count(txin.prevout) <= 1)
            continue;  // N
        range = mapTxSpends.equal_range(txin.prevout);
        for (TxSpends::const_iterator _it = range.first; _it != range.second; ++_it)
            result.insert(_it->second);
    }
    return result;
}
bool CWaet::HasWaetSpend(const uint256& txid) const
{
    AssertLockHeld(cs_);
    auto iter = mapTxSpends.lower_bound(COutPoint(txid, 0));
    return (iter != mapTxSpends.end() && iter->first.hash == txid);
}
void CWaet::Flush()
{
    GetDatabase().Flush();
}
void CWaet::Close()