Dielectric Screening in a Layered Electron Gas