It (talking about the <IMAGE_LAST_ID> tag) leaves off the image number in the following URL:
So it looks like this when it breaks:
and says this:
Don't do that! go back to index.php!
And the "randomness" stops being random... only displaying the latest image over and over.
For me, now that I know WHY it breaks, it doesn't really matter. As long as it works for non-admin visitors, that's all I care about.