Mortal Coil - S4-E12
Continuity mistake: The shuttle is "parked" in the nebula to get a protomatter sample, and the nebula is visible in all windows. After the shuttle is hit, the camera looks at Tom, and the view in the window is the black of space with stars, rather than the bright nebula.
Chosen answer: Before Q sent the Enterprise to the beta quadrant to officially contact the Borg, there were already indications that the Borg was beginning to reach Federation territory. There were remarks towards the end of the first season of the Next Generation that several of the furthest Federation outposts were being attacked by some unknown enemy. They suspected the Romulans, but when contact with the Romulans was re-established, they learned that it was not them. The Hansens had simply figured things out much earlier than anyone else in the Federation. They learned about the Borg nine years earlier, but Starfleet mainly took notice when their outposts started getting wiped out. It is logical to assume that there were indications of Borg scouting parties and research efforts well before that.
Garlonuss ★