AssertionError in Table

According to
http://dev.vaadin.com/ticket/14759#comment:5
I set the -ea VM parameter to enable assertions during development. This showed an assertion error with my code at
https://github.com/vaadin/vaadin/blob/master/server/src/com/vaadin/ui/Table.java#L2827

According the comment it should only happen if client and server are out of sync.

I’m using a Table (with multiselection enabled) together with a BeanContainer. The BeanContainer is updated every few seconds. Changing the selection after an update of the container lets the assertion fail. If assertions are disabled I don’t see any obvious problems though. How can I make sure that client and server are in sync?

BeanContainer is updated in a background thread? Is the code wrapped in UI.access?