When a xpath ruleset is made of several rules, and, for instance, the second rule return a void (because the underlying website as an optional HTML node for example), then the $basenode value will be filled with the node returned by the first rule of the set.
So, to correct this and avoid repetitions into the result, the basenode=false have to be inside the rule's loop.
Bugfix/Enhancement
[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[x] Have you successfully ran tests with your changes locally?
When a xpath ruleset is made of several rules, and, for instance, the second rule return a void (because the underlying website as an optional HTML node for example), then the $basenode value will be filled with the node returned by the first rule of the set. So, to correct this and avoid repetitions into the result, the basenode=false have to be inside the rule's loop.
Bugfix/Enhancement
Example
Website: http://secouchermoinsbete.fr/ ATOM: https://secouchermoinsbete.fr/feeds.atom Rule: