I solved the problem by customizing the template and generating distinct IDs. I also found out that having multiple elements with the same ID is a bad practice and should be avoided. Still, it would have been nice to have alternative ways of specifying the container.