srenblad Thanks for your reply. I figured out what went wrong. Like you suggested, I was missing to delete some nix develop artifacts when switching in between the release-8 and release-9 branches.
I assumed the build pipeline would be "self-containing" so that I only have to delete the build folder in the artiq-zynq repository (and garbage collect the nix store) to achieve a clean state. However after looking at the .gitignore file I noticed that the nix pipeline also generates several Cargo.toml files within the /src folder. Pulling the commit I mentioned before must have triggered a regeneration of said files, which in turn lead me to assume that the commit fixed this error. Apologies for the confusion. I can now successfully switch in between branches 8 and 9 and generate gate-&firmware on the same host machine.
In case anyone encounters errors when switching between artiq-8/9 branches: Make sure you delete following Cargo.toml files under the artiq-zynq/src directory:
libboard_artiq/Cargo.toml
libc/Cargo.toml
libdyld/Cargo.toml
libio/Cargo.toml
libksupport/Cargo.toml
runtime/Cargo.toml
satman/Cargo.toml