I solved the problem. More general rules need to be declared before the narrower. In this case, first processed narrow rules, then the general rules. This allows you to bypass the execution of the general rule, giving a chance to execute narrow rules. So like that: