diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index 1938c94..171a541 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -566,13 +566,13 @@
 }
 
 void
-Forwarder::insertDeadNonceList(pit::Entry& pitEntry, Face* upstream)
+Forwarder::insertDeadNonceList(pit::Entry& pitEntry, const Face* upstream)
 {
   // need Dead Nonce List insert?
   bool needDnl = true;
   if (pitEntry.isSatisfied) {
     BOOST_ASSERT(pitEntry.dataFreshnessPeriod >= 0_ms);
-    needDnl = static_cast<bool>(pitEntry.getInterest().getMustBeFresh()) &&
+    needDnl = pitEntry.getInterest().getMustBeFresh() &&
               pitEntry.dataFreshnessPeriod < m_deadNonceList.getLifetime();
   }
 
diff --git a/daemon/fw/forwarder.hpp b/daemon/fw/forwarder.hpp
index 6d4a068..51e4dd0 100644
--- a/daemon/fw/forwarder.hpp
+++ b/daemon/fw/forwarder.hpp
@@ -224,7 +224,7 @@
   NFD_VIRTUAL_WITH_TESTS void
   onNewNextHop(const Name& prefix, const fib::NextHop& nextHop);
 
-NFD_PROTECTED_WITH_TESTS_ELSE_PRIVATE:
+private:
   /** \brief set a new expiry timer (now + \p duration) on a PIT entry
    */
   void
@@ -234,8 +234,8 @@
    *  \param upstream if null, insert Nonces from all out-records;
    *                  if not null, insert Nonce only on the out-records of this face
    */
-  NFD_VIRTUAL_WITH_TESTS void
-  insertDeadNonceList(pit::Entry& pitEntry, Face* upstream);
+  void
+  insertDeadNonceList(pit::Entry& pitEntry, const Face* upstream);
 
 private:
   ForwarderCounters m_counters;
diff --git a/daemon/table/dead-nonce-list.cpp b/daemon/table/dead-nonce-list.cpp
index 5226140..5805842 100644
--- a/daemon/table/dead-nonce-list.cpp
+++ b/daemon/table/dead-nonce-list.cpp
@@ -45,8 +45,6 @@
 
 DeadNonceList::DeadNonceList(time::nanoseconds lifetime)
   : m_lifetime(lifetime)
-  , m_queue(m_index.get<0>())
-  , m_ht(m_index.get<1>())
   , m_capacity(INITIAL_CAPACITY)
   , m_markInterval(m_lifetime / EXPECTED_MARK_COUNT)
   , m_adjustCapacityInterval(m_lifetime)
@@ -91,10 +89,13 @@
 DeadNonceList::add(const Name& name, Interest::Nonce nonce)
 {
   Entry entry = DeadNonceList::makeEntry(name, nonce);
-
   const auto iter = m_ht.find(entry);
-  if (iter != m_ht.end()) {
-    m_queue.relocate(m_queue.end(), m_index.project<0>(iter));
+  bool isDuplicate = iter != m_ht.end();
+
+  NFD_LOG_TRACE("adding " << (isDuplicate ? "duplicate " : "") << name << " nonce=" << nonce);
+
+  if (isDuplicate) {
+    m_queue.relocate(m_queue.end(), m_index.project<Queue>(iter));
   }
   else {
     m_queue.push_back(entry);
@@ -132,16 +133,19 @@
 void
 DeadNonceList::adjustCapacity()
 {
+  auto oldCapacity = m_capacity;
   auto equalRange = m_actualMarkCounts.equal_range(EXPECTED_MARK_COUNT);
   if (equalRange.second == m_actualMarkCounts.begin()) {
     // all counts are above expected count, adjust down
     m_capacity = std::max(MIN_CAPACITY, static_cast<size_t>(m_capacity * CAPACITY_DOWN));
-    NFD_LOG_TRACE("adjustCapacity DOWN capacity=" << m_capacity);
   }
   else if (equalRange.first == m_actualMarkCounts.end()) {
     // all counts are below expected count, adjust up
     m_capacity = std::min(MAX_CAPACITY, static_cast<size_t>(m_capacity * CAPACITY_UP));
-    NFD_LOG_TRACE("adjustCapacity UP capacity=" << m_capacity);
+  }
+
+  if (m_capacity != oldCapacity) {
+    NFD_LOG_TRACE("adjusting capacity " << oldCapacity << " -> " << m_capacity);
   }
 
   m_actualMarkCounts.clear();
@@ -157,10 +161,12 @@
     return;
 
   auto nEvict = std::min(m_queue.size() - m_capacity, EVICT_LIMIT);
-  for (; nEvict > 0; --nEvict) {
-    m_queue.erase(m_queue.begin());
+  for (size_t i = 0; i < nEvict; i++) {
+    m_queue.pop_front();
   }
   BOOST_ASSERT(m_queue.size() >= m_capacity);
+
+  NFD_LOG_TRACE("evicted=" << nEvict << " size=" << size() << " capacity=" << m_capacity);
 }
 
 } // namespace nfd
diff --git a/daemon/table/dead-nonce-list.hpp b/daemon/table/dead-nonce-list.hpp
index ff9dfcd..84043be 100644
--- a/daemon/table/dead-nonce-list.hpp
+++ b/daemon/table/dead-nonce-list.hpp
@@ -131,19 +131,20 @@
 private:
   const time::nanoseconds m_lifetime;
 
-  using Index = boost::multi_index_container<
+  struct Queue {};
+  struct Hashtable {};
+  using Container = boost::multi_index_container<
     Entry,
     boost::multi_index::indexed_by<
-      boost::multi_index::sequenced<>,
-      boost::multi_index::hashed_non_unique<boost::multi_index::identity<Entry>>
+      boost::multi_index::sequenced<boost::multi_index::tag<Queue>>,
+      boost::multi_index::hashed_non_unique<boost::multi_index::tag<Hashtable>,
+                                            boost::multi_index::identity<Entry>>
     >
   >;
-  using Queue = Index::nth_index<0>::type;
-  using Hashtable = Index::nth_index<1>::type;
 
-  Index m_index;
-  Queue& m_queue;
-  Hashtable& m_ht;
+  Container m_index;
+  Container::index<Queue>::type& m_queue = m_index.get<Queue>();
+  Container::index<Hashtable>::type& m_ht = m_index.get<Hashtable>();
 
 NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
 
