docs: private boolean _isLastPhaseInRequest(FacesContext facesContext)
      {
          final PhaseId currentPhaseId = facesContext.getCurrentPhaseId();
          
          boolean lastPhaseNormalRequest = PhaseId.RENDER_RESPONSE.equals(currentPhaseId);
          // According to the spec, if there is a redirect, responseComplete() 
          // has been called, and Flash.setRedirect() has been called too,
          // so we just need to check both are present.
          boolean lastPhaseIfRedirect = facesContext.getResponseComplete()
                  && _isRedirectTrueOnThisRequest(facesContext);
          
          return lastPhaseNormalRequest || lastPhaseIfRedirect;
      }