It's fun going back and running into the same problems 6 years later!
I went back to see what I missed, and have run into the same wall. Yes - you can use the api twice, and yes - it actually does return the same url on that same page. I got really excited when I tested it, but then I realized (and re-remembered) the core problem.
The URL for the pic is just that, it is the URL for the bare pic on its own. That URL is actually not related to the web page that shows the smugmug gallery with the pic selected. So I chose back then to point it to the gallery for all links, rather than the relatively pointless bare URL - which just takes you to a page that shows the same picture you are already looking at, except with nothing else on the page.