refs: use same lock_file object for both ref-packing functions