PR for #355: Collections inside Collections - JS problem

Hi.
Because I had the same problem as @byhoratiss in #355 and he already made a fix but did not create a PR, I thought I'll do that :-)

I hope that's okay. I have tested his fix with branch `v2.2.x` and it worked fine.