fix problem with non-expanding tree-element

See issue #494