hashlog: fix erase while iterating exception