This is a real bug that is not yet fixed in rework master.
Specifically, because rework splits selectors naively at ,, and :matches(...) allows comma-separated selectors, rework will split :matches(.foo, .bar, .baz) into [':matches(:foo', '.bar', '.baz)'], which is incorrect.
You should be sure your solution parses a variety of selectors correctly.