function thunkFor(p, context) {
  // eslint-disable-next-line no-use-before-define
  return () => ExportMapBuilder.for(childContext(p, context));
}
The creation of this closure is isolated from other scopes
to avoid over-retention of unrelated variables, which has
caused memory leaks. See #1266.