The late-stage formation of giant planetary systems is rich in interesting dynamical mechanisms. Previous simulations of three giant planets initially on quasi-circular and quasi-coplanar orbits in the gas disc have shown that highly mutually inclined configurations can be formed, despite the strong eccentricity and inclination damping exerted by the disc. Much attention has been directed to inclination-type resonance, asking for large eccentricities to be acquired during the migration of the planets. Here we show that inclination excitation is also present at small to moderate eccentricities in two-planet systems that have previously experienced an ejection or a merging and are close to resonant commensurabilities at the end of the gas phase. We perform a dynamical analysis of these planetary systems, guided by the computation of planar families of periodic orbits and the bifurcation of families of spatial periodic orbits. We show that inclination excitation at small to moderate eccentricities can be produced by (temporary) capture in inclination-type resonance and the possible proximity of the non-coplanar systems to spatial periodic orbits contributes to maintaining their mutual inclination over long periods of time.