Description
A .find() call like $(x).find(".foo button") will only find button elements that have a parent with class "foo" somewhere in the DOM subtree under element x. That is the jQuery intention.
However, a .find() call like $(x).find(":not(.foo button)") will find all elements that are not a button descending from an element with class "foo". However, that descendant test is not scoped to the subtree under element x. If any element from x up to the root of the DOM has class "foo", buttons will be excluded from the result.
This may be intentional or preserved for legacy reasons. I have not personally suffered from this, the bug is mostly to have something to reference.
Link to test case
https://codepen.io/Pointy/pen/OJwWyMb?editors=1111