What if `reference_target` is NULL (for symbolic refs)? I don't think `newOidFromC` checks this.