Cohomology of preimages with local coefficients