I don’t know if it’s the best way of doing it, but that is intentional. Thickbox grabs the caption from the title attribute, which is inconvenient if you’re not coding static links. If you look at the code snippet above, you can see that’s coming from this portion:
echo '<a class="thickbox" href="' . $large_image_url[0] . '" title="' . get_the_excerpt('echo=0') . '" >';
I needed to do this to populate the caption area dynamically from the excerpt because 1.) I didn’t know of another way to enable captions, and 2.) The captions must support HTML characters.
I hope I didn’t misunderstand you, thanks for your feedback.