if I understand correctly the fix works because catching the case where the folder was open before and is closed now allows to avoid creating dupe nodes by calling _projectTree.jstree("open_node", $directoryNode); instead of _createNode($directoryNode in line 1987. That seems to be working fine.