If you have a page with multiple TreeView instances, only the first one will have it's expanded/collapsed state correctly set when the page loads/reloads. This is due to a tiny error in the TreeViewAdapter.cs SaveAdapterViewState method.
Replace this line:
Page.ClientScript.RegisterOnSubmitStatement(GetType(), GetType().ToString(), script);
With this:
Page.ClientScript.RegisterOnSubmitStatement(typeof(TreeViewAdapter), _viewState.ClientID, script);