Fix how logical AND is built so that multiple category inclusion is handled correctly.