Merge branch 'valentindavid/script-artifact-corruption-1.2' into 'bst-1.2'

[backport] Fix cache corruption by scripts when layout and integration commands are used

See merge request BuildStream/buildstream!940