[inspect] Fix tree Node creation logic