ACF Repeater Field won't output

… oh boy. My fault. I used a script from the forum to use the gallery field with the nested slider element:

This clashes somehow with acf. I’ve removed the script and the output is now correct and as expected. Can someone kindly explain me why this clashes with repeater fields? It was not possible to loop over gallery field images within the nested slider so I stumbled over this solution.

add_filter( 'bricks/setup/control_options', function( $control_options ) {
    $control_options['queryTypes']['residence_images'] = esc_html__( 'Residence Images', 'as' );
    return $control_options;
} );

add_filter( 'bricks/query/run', function( $results, $query_obj ) {
    switch ( $query_obj->object_type ) {
        case 'residence_images':
            $images = get_field( 'residence_images' );
            if ( ! empty( $images ) ) {
                $results = $images;
            }
            break;
    }
    
    return $results;
}, 10, 2 );

add_filter( 'bricks/query/loop_object', function( $loop_object, $loop_key, $query_obj ) {
    switch ( $query_obj->object_type ) {
        case 'residence_images':
            global $post;
            $post = get_post( $loop_object['ID'] );
            setup_postdata( $post );
            break;
    }
    
    return $post;
}, 10, 3 );