The code element already works as expected.
So there’s just a very important loopable wrapper element missing in Bricks to create much more powerful stuff with native Bricks query loops. I’ve submitted the idea of a div element with no HTML output, that just wraps child elements within a loopable container.