fix a link bug on gallery pages

if we know an id for a gallery exhibit but not its page (as in the case of a site search result) we must discover the page so the proper thumbnails are displayed.