Don’t create lockfiles with an invalid path name
Don’t create lockfiles with an invalid path name

Store paths are only allowed to contain a limited subset of the
alphabet, which doesn’t include `!`. So don’t create lockfiles that
contain this `!` character as that would otherwise confuse (and break)
the gc.

Fix #5176

rycee/nix,NixOS/nix,NixOS/nix,rycee/nix,rycee/nix,rycee/nix,NixOS/nix,rycee/nix,NixOS/nix,NixOS/nix