Not knowing the details here but are you sure this can't become a race condition? Is TreeItem guaranteed to be constructed from one task context only?