always use $and at the top of the query

This avoids the case of 2 top-level $or in the object.
Instead a double $or will be sepate objects in an array.

{$or: ..., $or: ...} => {$and:[{$or:...},{$or:...}]}