Adaptive constant false alarm rate (CFAR) detectors operating on envelope-squared matched-filtered beam data generally employ two equal fixed-length windows, straddling the test cell, to collect reference samples. Our objective is to prevent the consideration of reference sample sets that do not behave even approximately i.i.d. A procedure to adaptively determine window sizes is presented. The nested hypothesis testing procedure is based on the principles of quality control and utilizes the Mann-Kendall rank test for randomness. Potential benefits include improved false alarm control, increased detection probability and closer tracking of extended clutter edges