Refactor some dead code in PeerDequeue.