"error: operation is only supported by LocalStore" after update from 17.09 to 18.09

Summary: after switching to 18.09 and restarting nix-daemon on a nixpkgs installation on top of Debian, the command nix-env --always -u \* fails with " operation is only supported by LocalStore", and the command nix-env -e homePkgs results in thousands of nix-daemon processes being created until I press ctrl-C.

Question: Does anyone know what’s going on or have an idea for investigating further? Before I simply reinstall nixpkgs, it would be nice to find out what happened and fix bugs and/or improve error messages.

Details at https://github.com/NixOS/nixpkgs/issues/48470.