Merge issue for a client add sublist render horizontally for certain template

I'm trying to create an Apsona Doc Generation document that will look like
a "yearbook page" with a photo and name underneath it, in a 4-column table.
I'm using the Tablestart and table end merge tags, but so far I've only been
able to create a table that has the same photo four times on each row, or
in the leftmost column, then the next row has the next photo 4 times in the
row and so on.

I think I need a merge tag like the "next record" one that is used in
mailing labels but I haven't been successful in inserting that and making
it work properly. What am I missing? I'm attaching my template and an
example of my failed attempts.