Fix selecting the previous node on changing the tree nested switch