Fixed the invalid iterators bug in the STL list.