Explicitly set the value of 'collapsed' for #8208

For #8208. @peterflynn or @TomMalbran 
This seems to work, but I have never seen C-style type casting in JavaScript (although I've wished for it many times! :) ). This is calling Boolean ctor function, but we shouldn't call those without using "new", right?

I think this should be one of these forms:

```
        resultInfo.collapsed = !!resultInfo.collapsed;
        resultInfo.collapsed = new Boolean(resultInfo.collapsed);
```

@peterflynn Not sure if @njx is around to respond, so what do you think?