Indeed, thanks to the fact the matching stops after the first match!
If everybody agrees, sbrunot, I suggest redoing the PR this way.