Many thanks for this rule, Marco.
The logic is almost correct. The problem is that inflected='yes' only applies to the words inside the token parameter, not inside the tag, nor with the postags.
<token inflected='yes' postag="VMN0000"></token> should become
<token postag_regexp='yes' postag="V.+"/>.
I believe this will do it. To improve, you can also generelise the Noun. For example, in the first subrule:
<token postag="NCMP000"></token> use
<token postag_regexp='yes' postag="N.MP.+"/> and it will work with diminutives, aumentatives, superlatives and proper nouns.
By the way, I was able to add one case from the 'de mais' 'demais' rule, but I believe that is a rare confusion case. Check git for details.
Test if it works as you expected and, if you wish I will push it after testing to the repo.