Avoid processing invalid directive elements
The old code simply abandoned the entire loop at the first error; this
meant that a "directory" element after an error would not be seen and was
fixed in commit
86b458910ddda2c227622cafa3c37b10682d0561. That commit
allowed the values of the capture variables from the last successful match
to be reused if a later line did not match its filter pattern.
No exploit was possible, since an error was recorded and an exception would
be thrown instead of returning the corrupted operation list, but this had
side effects that caused failures in the testsuite that were traced to this
issue, now fixed.