Just had some strange behavior where a Note was being counted twice in a collect_if(). Turns out the problem was use of a semicolon in the note title ($Name attribute). when I removed the “;” the issue resolved and I am all set.
Not sure if this behavior is a bug or intentional, but the take away for me is to avoid using semicolon in $Name.
Aside: the other character I also avoid is the “/” - I know it can be quoted to avoid being interpreted as part of a path, but I would rather just avoid any confusion.