Shielding and distortion of rare-earth crystal-field spectra