remote.c: refactor creation of new dst ref