BUG: Raise exceptions when an invalid file position is returned.