Fixed #21478 -- join promotion for negated AND conditions

Made sure Django treats case NOT (a AND b) similarly to case
(NOT a OR NOT b).