It seems that the displayed caption always overrides the title, even if none is defined. This comes with an interesting side-effect of the caption being displayed twice:
I think the desired behaviour in this situation would be to either keep displaying the filename with the caption, or just the caption and nothing else.