Finite-temperature perturbation theory for a spatially inhomogeneous Bose-condensed gas