The writers of both the Star Trek:The Next Generation finale and the movie Star Trek: Generations found themselves experiencing a mix up with the scripts.
Q is not just a letter in the alphabet. When Star Trek: The Next Generation launched, an unforgettable character was created alongside the new crew of the Enterprise D. John de Lancie appeared as the omnipotent hassle known only as “Q” in the pilot episode. He put all of humanity on trial, and he continued to be a presence on the series up through the finale.