In SDK we have a method that checks if a position is valid. But the "valid" is not defined precisely. For example, the SDK expects it to mean "position is set at least partially", while user-facing code like iterators assumes it means "values used in positions are in a valid range".
We must first define a separate function that checks the range (e.g. offset >= 0), and then find and update all the places that expect this condition to hold.
The quick fix would be to add a check to the positional iterator specifically.
Related to bblfsh/python-client#172