Consider the test 'Show a sibling popover during "hide all popovers until' merged in https://github.com/web-platform-tests/wpt/pull/39647/files:
when p16.hidePopover() is called, https://html.spec.whatwg.org/#hide-popover-algorithm invokes https://html.spec.whatwg.org/#hide-all-popovers-until with element p16.
In https://html.spec.whatwg.org/#hide-all-popovers-until, the first time after reaching step 6.3. foundEndpoint is true and lastToHide is null. In step 6.6., repeatingHide is set to true. Step 6.3. is executed again and foundEnpointis true, lastToHide null and it will continue like that.