Eventually, I ended up splitting my query. In the first part, I got all the records that satisfy my exclude condition and then in the later part I got the records that satisfy my include conditions.