Controlled nanostructuring of thin-film solar cells offers a promising route toward increased efficiency through improved light trapping. Many such light trapping designs involve structuring of the active region itself. Optimization of these designs is aided by the use of computer simulations that account for both the optics and electronics of the device. We describe such a simulation-based approach that accounts for experimental tradeoffs between high-aspect ratio structuring and electronic material quality. Our model explicitly accounts for localized regions of degraded material quality that is induced by light trapping structures in n-i-p a-Si:H solar cells. We find that the geometry of the defects couples to the geometry of light absorption profiles in the active region and that this coupling impacts the spectral response of the device. Our approach yields insights into the nanoscale device physics that is associated with localized geometry-induced defects and provides a framework for full optoelectronic optimization.