bitcoin/bitcoin — pull request #4969 by ENikS (2014-09-23 20:37:22+00:00)
Title: Fixed list's begin iterator after elements erase

Normally pc holds iterator to begin(). After line 547 is executed and few elements are erased from the head this variable needs to be re-initialized with iterator to a new head of the list.