Scattering of high-energy electrons on 27Al, 31P and 32S and the core-excitation model