Mongoid stashes the in-memory regexp budget for the current thread under the key 'regexp-budget'. Every other key it uses is prefixed with '[mongoid]:' so it can't clash with anything else.
If something else happens to use that same key, Mongoid sees the value already there and assumes a budget is open, so the regexp bound for the query gets skipped. Master is unaffected because its thread-local keys all live under a single [mongoid] hash.