rustpkg: Fix fetching remote packages

r? @cmr Closes #9193