public static void dontCacheGoalFailureBetweenFrames(ControlFrame topframe, ControlFrame bottomframe) {
    for (;;) {
      topframe.dontCacheGoalFailureP = true;
      if (topframe == bottomframe) {
        return;
      }
      topframe = topframe.up;
    }
  }