When running an aggregation pipeline with a $facet stage where one of the sub-pipelines contains a $setWindowFields stage, the execution fails with the following error:
MongoServerError: PlanExecutor error during aggregation :: caused by :: Requested document not in SpillableCache. Expected range was 0--1 but got 0
The server log file reports the error code 5643004 (see "steps to reproduce" for more detail). If one of the two facets is removed,everything works as expected.