reimplementing jonprindivilles jstree fix #2270

this fix was overridden previously.  addresses issue #2573.