Image subclass returned from ColumnGenerator not rendered

I use the following subclass of Image:
[font=courier new]
public static class ImageViewer extends Image implements Property.Viewer {
private Property dataSource;

public void setPropertyDataSource(Property newDataSource) {
    this.dataSource = newDataSource;
    setIcon(new StreamResource(new StreamSource() {
        public InputStream getStream() {
            return dataSource.getValue() != null ? new ByteArrayInputStream(dataSource.getValue()) : null;
        }
    }, "image.png"));
}

public Property getPropertyDataSource() {
    return dataSource;
}

}
[/font]

When I return instance of this class from ColumnGenerator, the image is not rendered in the table. When I return standard Image, it works.

From debugging, the setIcon method is called, but the
StreamSource.getStream
is not.

My workaround is this:

if (oField instanceof ImageViewer)
return new Image(((Image) oField).getCaption(), ((Image)oField).getIcon());

Now the
getStream
method is called. Am I doing something wrong or is there a bug? I’m using vaadin 7.1.10.

Thanks, Viliam