I found the problem. Now I have to find the solution . The checkboxes are located in one ui:define tag and the command link is located in another. If both components are in the same ui:define it works. Otherwise I have to first click on one of the generated checkboxes and then it starts working perfectly (starts to refresh the UI).
Here are some strange observations...
Actually I have construction like that:
<h:panelGroup layout="block" id="test"
... some generaeted content (see the post above) ...
<a4j:commandLink ... reRender="test" ...
When the page is loaded and I try to use the command link from form2 it does not work (it calls the backing bean and changes the checkbox value holder but does not refresh the UI). When I manually click on a checkbox then everything starts working and the command link refreshes the form1 UI.
I hope that I am not writing only to myself and someone can give me a hand