All these hashtables, and some of the ones we added earlier, look like they need to have old values removed in `trimIfNecessary()`. Can you add that there? Look at how `stageToTaskInfos` gets trimmed.