Added a fix for bug #1489, appending <caption> was broken.