Archive – Show Page Month Headers

I changed my approach in the end. I just called a single query and added the logic to check the date of the last post was in a different month:

            $today = date("r");
            $articledate = get_the_time('r');
            $difference = round((strtotime($today) - strtotime($articledate))/(24*60*60),0);


                if ($month_sort == true && ($difference <= 7) && $current_week == null) {
                    $vpost_count = 0;
                    echo '</h3><div class="clear"></div><h3>This Week</h3><div class="clear"></div>';
                    $current_week = 'set'; 

                }
                elseif ($month_sort == true && $current_month != get_the_date('F') && $difference >= 7) {
                    $vpost_count = 0;
                    echo '</h3><div class="clear"></div><h3>'.get_the_date('F').'</h3><div class="clear"></div>'; 
                    $current_month = get_the_date('F');
                }