In GeoSearch::expandEndPoints there is an iterator decrement that can synthesize an iterator equivalent to --multiset::begin():
This is illegal in C+11 even if the iterator is never dereferenced since one of the prerequisites for operator--() on a BidirectionalIterator 'r' is that there exists 's' such that r == ++s, and there is no such 's' for r == begin() [24.2.6]. This causes a crash when mongo is built against libc+.
Need to check C++98 to know for sure that this is illegal there (I'd guess it is), but it seems safer to not form the potentially illegal iterator anyway.