The inherent frustration due to macroscopic chirality in systems of evenly spaced layers is responsible for many of the intricate textures observed in type II smectic liquid crystals. The twist-grain-boundary (TGB) phase, often referred to as the analog of the Abrikosov flux lattice in superconductors, employs lattices of screw dislocations to mediate the propagation of twist thereby relieving the frustration. Likewise, the helical nanofilament (HN) phase of bent-core liquid crystals presents as hierarchical structure composed of bundles of nested helicoids which assemble themselves into a lattice. It has been postulated that above a critical chirality the TGB phase becomes unstable with respect to the HN phase. We present a solution to the Landau-de Gennes free energy that describes both the layer structure and associated director field for a TGB phase with any grain angle. This new description of the TGB enables a more comprehensive stability analysis with the HN phase , valid at high chiralities.