Fix for invalidated iterators on erase, and assertions' numeric_limits type.