For those who may find this helpful in the future, I adapted my code as follows:
<?php if( have_rows('sidebar-content') ): ?>
<?php while ( have_rows('sidebar-content') ) : the_row(); ?>
<?php if( get_row_layout() == 'text-content' ): ?>
<div class="sidebar-text-content">
<?php the_sub_field('flexible-text-content'); ?>
</div>
<?php elseif( get_row_layout() == 'quote' ): ?>
<blockquote>
<?php the_sub_field('quote-text'); ?>
<span class="quote-source">
<?php the_sub_field('quote-source'); ?>
</span>
</blockquote>
<?php elseif( get_row_layout() == 'images' ):
$image = get_sub_field('image');
echo '<img src="' . $image['sizes']['large'] . '" alt="' . $image['alt'] . '" />';
?>
<?php elseif( get_row_layout() == 'button' ): ?>
<a class="button" href="<?php the_sub_field('button-link'); ?>"><?php the_sub_field('button-text'); ?></a>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>