in reply to Re^4: Leaking Regex Captures
in thread Leaking Regex Captures

It fails but that does not mean it still captures.   In fact it can't have captured because that branch was not taken.   What it means is that the $1 variable has invalid data in it.