(bug 1016) Fix handling of lines omitting Image: in a <gallery> tag