osv: Improve the translation logic for the osv.check wrapper