I believe for the intent of OutlinePass.setSelection,
this.clearSelection() in OutlinePass.js should be performed before the "for" loop that sets the newly selected items' layer.
(current line 373, move to line 364, just after the two "const" declarations)