Fix bugs that crept into spack clean when stage was refactored.