Bug 1058853 - Don't break the gallery if we have corrupt images