Simplify top-level $and queries so MongoDB can use indexes properly.