remote: avoid passing NULL to read_ref()