But a story, in some ways, grows as much up from its foundations like a cathedral as it moves like a train, plowing forward. Even writers who forge into it from the first scene to the last often have to go back and forth to add structural support for the scene just written. In the future, there may just need to a note that since our hero has started to prepare for future events, some of them have to use his preparations, and other events should probably happen that he hasn't prepared for, to throw him off balance. If, however, you realize that he would have realized this particular peril lay ahead, and gotten the gingerbread to ward the troll off -- or have carefully checked for whether trolls haunted those regions to be blindsided by them -- then you have to go back and do it.
The fun part is when you reach a scene of preparation, and you know it needs to foreshadow, and yet -- what, exactly?
Sometimes you can just throw something in, and it may prove exactly the thing to jog your imagination with the perfect problem for it to fix. Otherwise -- well, square brackets are your friend. Or curly ones. It hardly matters except that it can't be something you would use in standard typography. Because its purpose is to let you locate the points where you knew you needed foreshadowing once you know what they must foreshadow. (Or when you realize you will need to do some brainstorming or excision, because you reached the end without inspiration striking. sigh)