Diagnosing our own knowledge gaps is actually half the battle. Experts aren't people without knowledge gaps -- they're people who excel at recognizing them and solving them early!
I've observed in my research that when exploring an unexpected friction or "break" experts do a lot of "anchoring" -- choosing a piece of the codebase or a causal relationship they feel they deeply understand and iterating in tiny steps out from there. This is in line with good learning science!