TreeTable add item error when filtered

Hi everyone,
I have a TreeTable with a “Lazyloading-style” HierarchicalContainer. To make it simple, it’s just a treetable where datas are added when parent’s nodeExpand event is fired. It’s working fine.

Now I added a filter (simple text filter on one of the column), this filter works but when I want to expand one node of the filter result, I’m facing a NullPointerException on the code below :

final Integer itemId = (Integer) this.addItem();

if (parent != null) {
    this.setParent(itemId, parent);
}

[color=#FF0000]
this.getContainerProperty(itemId, "type").setValue(type);
[/color]

Does someone has already facing this problem ?
Thank you in advance for any help or information you may provide.

Matthew.