Unable to save /etc/rc.local changes; 'XHR request aborted by browser'

I just upgraded my Linksys WRT1900ACS to 21.02.0 and am attempting to add a line to /etc/rc.local as suggested here: WRT1900ACS v1 hangs frequently on OpenWrt 21.02.0-rc3. Every time I click 'Save' I get 'Unable to save contents: XHR request aborted by browser'. After that OpenWRT can no longer find LuCi - attempting to navigate to any page returns a 404.

I guess I can SSH in to make the changes to /etc/rc.local, but would very much like to understand why I can't make those changes through LuCi. Also, losing the GUI sounds like a bug to me, or at least something that should be documented. I am running Firefox; I haven't yet tried this with Chrome.

At first I would've suggested that rpcd is crashing, but that should not lead to 404 errors but to internal server errors from LuCI complaining about it unable to read its configuration.

The symptoms sound a bit as if you're suddenly communicating with another web server. I tried pasting some sample commands using a 21.02.0 x86/64 build in Qemu here and that worked just fine. So the problem must be specific to the architecture / your build / browser etc.

When I get an opportunity I will try using Chromium rather than Firefox. The GUI does come back after I rebooted both the PC and the router; I also need to try rebooting just the router.