G-convergence usually deals with the convergence of sequences of elliptic or parabolic operators. When the convergence of the sequence of operators is strong enough, it is trivial to determine the $G$-limit. Other cases need sophisticated techniques for this aim, where the most well investigated case is periodic homogenization. The main tool of today for this purpose has become the so called two-scale convergence method by Nguetseng. This approach relies on a fundamental compactness result which says that for any bounded sequence $\\left\\{ u_{h}\\right\\} $ in $L^{2}\\left( \\Omega \\right) $ there is $u_{0}\\in L^{2}\\left( \\Omega \\times Y\\right) $ such that \\begin{equation*} \\dint\\nolimits_{\\Omega }u_{h}(x)\\tau _{h}v(x)dx\\rightarrow \\dint\\nolimits_{\\Omega} \\dint\\nolimits_{Y}u_{0}(x,y)v(x,y)dxdy\\end{equation*}% for any $v\\in X=L^{2}(\\Omega ;C_{\\sharp }(Y))$ up to a subsequence, where% \\begin{equation*} \\tau _{h}v(x)=v(x,\\frac{x}{\\varepsilon _{h}}),\\varepsilon _{h}\\rightarrow 0% \\text{.}\\end{equation*} For gradients of sequences $\\left\\{ u_{h}\\right\\} $ bounded in $H^{1}\\left( \\Omega \\right) $ the deviation from the week limit can be made explicit in terms of a local gradient $\\nabla _{y}u_{1}$, $u_{1}\\in L^{2}(\\Omega;H_{\\sharp }^{1}(Y))$, and this is the key to the characterization of the $G$%-limit. Similar techniques can be developed for other choices of the maps $\\tau _{h}$ and admissible spaces $X$ which do not necessarily depend on any periodicity assumptions. We study such examples with respect to the possible appearance of residual terms corresponding to $\\nabla _{y}u_{1}$ in periodic homogenization. In particular $G$-limits for problems, where the matrices defining the operators are generated by a kind of modified Hilbert-Schmidt operators, are investigated with respect to such deviations.