Fix missing origin in permalink box when using old SWHID
When using an old SWHID with context:
https://archive.softwareheritage.org/swh:1:cnt:64582b78792cd6c2d67d35da5a11bb80886a6409;origin=https://github.com/virtualagc/virtualagc;lines=245-261/
The origin in the permalink box is missing. There is also an empty path:
swh:1:cnt:64582b78792cd6c2d67d35da5a11bb80886a6409;path=/;lines=245-261
Migrated from T2427 (view on Phabricator)