The accordion was inside facet of custom control - there was no dynamic container. But somehow I cannot create simple example of this behaviour - the accordion works well when put on a simple xpage. The application in which I have this effect is very complex and is really hard to extract what causes this problem.
But I also use dialog component and with this component its very simple to see what kind of problems Im dealing with.
Juts create empty xpage, add this code:
asfasf
refreshMode="complete">
And then observer firebug - You will see that lots of js code is loaded separately (aggregation does not work as I imagine it should).