Ok, that works indeed. It's different from what I did before in that the container is added after the document is filled.
Glad we found a common ground and slightly faster tests.