This REPL test page is based on the TreeView Filtering demo, but with added checkboxes.
A possible workaround is to also filter (or clear) the collection that is bound to the CheckedItems parameter of the TreeView.