[backend] clone the constraints before overwriting stuff

The constraints are cached, so cloning them leads to bad jobs
that share the same constraints file.