https://drafts.csswg.org/css-view-transitions-1/#capture-old-state-algorithm has:
For each element of every element that is connected, and has a node document equal to document, in paint order:
[...]
- If usedTransitionNames contains transitionName, then return failure.
[...]
- Set element's "captured in a view transition" to true.
- Append element to captureElements.
Note in particular that, if we take the failure path, any previous element that has the "captured in a view transition" bit to true doesn't end up in namedElements, which means that that bit isn't cleaned-up at all afterwards. That seems wrong? cc @khushalsagar @noamr