Prevent double-closing in OFFile.