MYFACES-2374 UIViewRoot.getBeforePhaseListener() and UIViewRoot.getAfterPhaseListener() could be called on PhaseId.RESTORE_VIEW (thanks to Jakob Korherr for the patch)