So I just realized I’ve been overlooking a rather simple solution:
<?php if(is_404()||is_search()){
$myFlexID = 'option';
}else{
$myFlexID = get_the_ID();
}
if( have_rows('qd_flex_page_content', $myFlexID) ):
$slideshow = false;
$flexCounter = 0; ?>
<div id="pageContentBlocks">
<?php while ( have_rows('qd_flex_page_content', $myFlexID) ) :