A while back, A.Wolff found an inconsistency in jQuery and posted it on StackOverflow.
I thought A.Wolff would submit this issue, but I can't find he did, so here it is:
In short; non-element (e.g. text) nodes in recursive :not(*) (and probably other) pseudo-selectors are treated differently for .filter() and .not().
I dug into the issue and found the cause. I'm not sure whether to consider this a bug or not, but there is an easy fix (in the answer) to make it atleast consistent. The cost of the fix is quite low.
Fix for #2808; inconsistent .not/.filter
Inconsistent ehaviour for non-element nodes when using multiple recursive pseudo-selectors on `*` in `.not()` and `.filter()`.
Testcases for #2808
Traversing: .not/.filter consistency with non-elements