It looks to be a problem specifically within the $unionWith that $searchMeta expands to. I can now reproduce and have what I think is a fix. I believe SERVER-59097 will fix this on master and I believe the plan is to backport that to the 5.0 branch.