This should fix issue #101 and #102 by post-incrementing the iterator passed into map::erase instead of using the return value.

Sorry for not realizing that map::erase did not always return a value.  This shouldn't need ifdefs to solve and also, running find is logarithmic cost vs. directly erasing with the iterator is constant cost.