How to return MinMax aggregate results in custom historian?

I’m currently implementing the minmax aggregation for a custom historian, and I’ve run into an odd issue. I’m able to find the min and max aggregations individually without issue, but when I try to put them together, I’m only getting half of my results. I know that QueryEngine.doQueryRaw/doQueryAggregated requires me to call DatapointProcessor.onPointAvailable. In broad strokes, as I'm processing the retrieved data, I call onPointAvailable and providing all the arguments; if there's 300 results, onPointAvailable is getting called 300 times. For MinMax, because each window is meant to hold 2 points, I'm called onPointAvailable twice, so if there's 300 results for min and max queries, I'm calling onPointAvailable 600 times. What I'm finding is I'm only getting the mins (probably because I’m adding them first). Is there something I’m missing?