Oh, I see my mistake now. I'll leave the python template, then.
When using my template, I do think the first time was slow, then other times were fast. I guess it's the work of the cache in action.
________________________
EDIT: I decided to check the difference between the two templates (mine and yours, but not the python one). It seems to find the same results, even if only one author has a note. Then, looking again at the code, I notice it does work:
Example: If i have a book with two authors (AuthorA and AuthorB), and only have notes for AuthorA.
$authors = 'AuthorA & AuthorB'
has_note('authors', '') = 'AuthorA'
Now, the comparison
if $authors in has_note('authors', '') will return False, as intended.
But I'm definitely staying with the python template.