OFFileIRIHandler: Fix undefined behavior