Getting the exact same error but from a much simpler sub field usage, I’m sure its just something I’m not writing out correctly:
<?php if( get_field('slide') ): ?>
<?php while( has_sub_field('slide') ): ?>
<?php the_sub_field('slide_image'); ?>
<?php the_sub_field('slide_title'); ?>
<?php the_sub_field('slide_subtitle'); ?>
<?php endwhile; ?>
<?php endif; ?>