stdenv: Prevent issues like #4266

This causes a full rebuild due to touching stdenv.

This should fix #4266 and would allow reverting the ugly hack #4273.

It also introduces `--reflink=auto` which greatly speeds up copying on filesystems that support reflinks.