I am using a ListViewByQuery in a custom web-part. If I set the CAML GroupBy to <GroupBy Collapse='FALSE'> (i.e. expanded), the webpart works fine. However, if I set it to <GroupBy Collapse='TRUE'>, the item will expand, but then is stuck/hangs on the "Working on it..." message:

(I believe the old message in SharePoint 2010 was "Loading...").
Here's the working copy when it's pre-expanded:

This doesn't appear to be a JavaScript issue (tested on multiple browsers).
How do I fix this?
Aside: Karine mentions a very similar issue on her blog using the ListViewByQuery Web Part here. I will test the suggested JavaScript fix and report back, but I believe this is only a workaround - what is the underlying cause and solution?
Update: I can't get the JS fix working. I'm dynamically generating the ListViewByQuery control in my custom webpart (as seemingly required) and while the JS seems to fire, I can't determine how to debug it.
Update 2: Finally got the JS fix working - the collapse was being called twice (so it would jsut expand again). Will suggest this as possible answer soon, but won't accept it as actual answer.