Vortex Lattice in Layered Superconductors in the Presence of a Tilted Magnetic Field