I think we should improve ``CSRFToken#getResubmissionURL()`` instead so that it handles the case when there is no current document on the context because this may be useful in other places too. This will also remove the need for the ugly ``context.setDoc(redirectDoc)`` hack below.