I just found out that you can also use:
$('#tree').jstree("deselect_all", true);
This will suppress the "changed.jstree" event, which I need for my page, and seems to be more in line with your original logic.
An excerpt from my working code is verbatim:
function DeselectTree() { $('[id ^= "forms-foldertree-"]').each(function () { $(this).jstree('deselect_all', true); }); }
source share