revert topic "matches-cleanup"

It has at least one error in the BISON code and I don't have time to work on
this today.
Merge topic 'matches-cleanup' into next

5b48f767 revert topic "matches-cleanup"