Document.uri() tried to read collected links from a wrong place

The plugin's uri() function tried to give back canonical uri, but it
tried to iterate through the links in @metadata despite
the links are stored in @metadata.links

So it has never found any canonical urls.