Clean Windows build warnings:
warning C4028: formal parameter <N> different from declaration
This was fixed independently in master and experimental but the fixes
were in opposite directions. One added const to the declaration and the
other removed it from the implementation.
Also update the variable names. This doesn't modify the data so call it
ref, matching the functions in the vicinity, rather than dst.