We consider the scattering problem for locally perturbed periodic penetrable dielectric layers, which is formulated in terms of the full vector-valued time-harmonic Maxwell's equations. By assuming a non-periodic right-hand side, or, a perturbation in the permittivity, one cannot reduce the problem to one periodic cell in the classical way. In this article we present a method to solve such scattering problems. For that, we apply the Floquet-Bloch transform to derive a coupled family of quasi-periodic problems and solve the individual quasi-periodic problems by combining some standard methods with technical calculations. This approach works as long as we stay away from the singularities in the quasi-periodicity of the Calderon operator, which we use for the boundary condition. The challenge is to prove the unique existence of the solutions for the quasi-periodicities inside the one-dimensional set for which the quasi-periodic differential operator is singular. The idea to tackle this problem is to construct a limit solution by letting the quasi-periodicity converge to a singularity while decomposing the quasi-periodic differential operator using the Sherman-Morrison-Woodbury formula. Additionally, we show regularity results of the Floquet-Bloch transformed solution to the perturbed problem on the unbounded domain with respect to the quasi-periodicity mode. These results, i.e., contribute to a numerical method to approximate the solution to the unbounded domain problem, which we will describe in a forthcoming work.