Preserve the referer ID when clicking the "switch to edit" button (see #6127)