[1.6.x] Fixed #21787 -- regression in MTI .exclude() queries

Backpatch of 78a2617703bc1dada409f126db5c3db214913ff4 from master.