Under some conditions, GetMaxPosition() returns zero, which should cause position queries to fail rather than crash.