[SOLVED] Get ACF image field inside an ACF repeater loop (code)

Hello,
I am rebuilding an Oxygen powered page, there the code is working fine.
I have an ACF repeater with an image (return array) subfield. I would like now to showcase the image with the caption displayed below.
I have setup an Bricks Query Loop set to the ACF repeater and inserted a code block.

<?php
$bild_querformat = get_sub_field( 'bild_querformat' );
if ( $bild_querformat ) : ?>
	<img width="100%" src="<?php echo esc_url( $bild_querformat['url'] ); ?>" alt="<?php echo esc_attr( $bild_querformat['alt'] ); ?>" />
<?php endif; ?>

<?php

$caption = $bild_querformat['caption'];

 if( $caption ): ?>
        <div class="av-wp-caption-text"><?php echo esc_html($caption); ?></div>
       
    <?php endif; ?>

This approach works fine inside of Oxygen. But on Bricks I now get an error:

Warning : Trying to access array offset on value of type bool in /www/htdocs/w017f3cc/STAGING_Bricks/wp-content/themes/bricks/includes/elements/code.php(160) : eval()'d code on line 9

Any idea what is going on here?
Thanks!

I have found the culprit, apparently bricks needs to get the whole ACF loop, that it can find the right row:
This one works

<?php

// Check rows exists.
if( have_rows('ausstellung_main_conent') ):

    // Loop through rows.
    while( have_rows('ausstellung_main_conent') ) : the_row();

        // Load sub field value.
        $bild_querformat = get_sub_field('bild_querformat'); 

?>
<?php if( $bild_querformat ): ?>
       
            <img width="100%" src="<?php echo esc_url( $bild_querformat['url'] ); ?>" alt="<?php echo esc_attr( $bild_querformat['alt'] ); ?>">
            <span class="av-wp-caption-text text--xs"><?php echo esc_html($bild_querformat['caption']); ?></span>

            <?php endif; ?>
<?php
    // End loop.
    endwhile;

// No value.
else :
    // Do something...
endif;

?>