Mysterious Javascript error on assigning a value to Listbox.columncount

In my current web project I reuse the same listbox for displaying data from different tables, so I change the columncount and the headings a lot. This works just fine - most of the times.
My code (executed in an action event of a segmented control) looks like:

Self.cb_showInactive.Caption="Inaktive anzeigen"
Self.LB.Heading(2)="letzter Login"[/code]

Sometimes I get this error:
Could not execute returned javascript: IndexSizeError: DOM Exception 1
Source: Xojo.controls[‘M8b8R08X’].setColumnCount(4);
Xojo.controls[‘M8b8R08X’].setColumnHeading(2,‘letzter Login’);

If I read this correctly the offending line is Self.LB.ColumnCount=4
But what might be wrong with that? Another thing I notice:
The line


is missing in the error message.

BTW, I have a break statement in my session.JavascriptError event, but I never land there. I also tried fiddling with Self.LB.visible=false then executing all that code and then Self.LB.visible=true again, but then it would choke on Self.LB.visible=false.

Could not execute returned javascript: IndexSizeError: DOM Exception 1
Source: Xojo.controls[‘SRK76YUc’].setVisible(false);

My attempts at reproducing this in a simple app were of course futile.
What could be going on there?
BTW, this is with Xojo 2016r1.1 already. I am testing this with Safari 9.1 under Mac OS 10.11.4

Moving the first call to this init method into the webpage.shown event (from the open event) appears to fix the issue. Shrug.

The only way you’ll get there is if you press the Send button on that javascript error dialog.