What does "RefillTree" do exactly? If it removes the Node referenced by 'i', then I would expect that setting the SelectedNode property to a node that does not exist in the control would have no effect.
EDIT:
I can almost guarantee that you are clearing the control and creating new nodes to fill it with. It does not matter if these new nodes contain the same data, SelectedNode looks for object equality and it doesn't find a match. for example, this code reproduces your problem:
treeView1.nodes.Add( new TreeNode( "Node 1" ) );
treeView1.nodes.Add( new TreeNode( "Node 2" ) );
treeView1.SelectedNode = new TreeNode( "Node 1" );
// null reference exception here, we did not find a match
MessageBox.Show( treeView1.SelectedNode.ToString( ) );
So, you can instead find the node by value after clearing the control:
TreeNode node1 = new TreeNode( "Node 1" );
TreeNode node2 = new TreeNode( "Node 2" );
treeView1.Nodes.Add( node1 );
treeView1.Nodes.Add( node2 );
treeView1.Nodes.Clear( );
treeView1.Nodes.Add( "Node 1" );
treeView1.Nodes.Add( "Node 2" );
// you can obviously use any value that you like to determine equality here
var matches = from TreeNode x in treeView1.Nodes
where x.Text == node2.Text
select x;
treeView1.SelectedNode = matches.First<TreeNode>( );
// now correctly selects Node2
MessageBox.Show( treeView1.SelectedNode.ToString( ) );
Using LINQ here seems clunky, but the TreeNodeCollection class only exposes a Find() method which uses the node's Name property. You could also use that, but equally clunky.