David's murder comes back around in the sixth film, "Star Trek VI: The Undiscovered Country." The Klingon Empire is hoping for peace with the Federation, but most of the Enterprise crew is wary of allying with the people they've spent their careers fighting. Kirk is especially troubled at the prospect, since he holds Klingons (all Klingons) responsible for David's death.
This line is a nod to Star Trek VI: The Undiscovered Country, in which Spock says, “An ancestor of mine maintained that if you eliminated the impossible, whatever remains, however improbable, must be the truth,” a line spoken by Sherlock Holmes in The Sign of the Four.