It makes more sense to access position() if positionValid() returns true. (cherry picked from commit d074b47a)