Yeah, the continuity error is with Generations, one could say that "Relics" already established Scotty as leaving on the Jenol*n before there ever was an Enterprise-B.
I don't regret the fact that Scotty is there in Generations, but it was a perfectly avoidable problem. Generations co-writer was the sole writer of "Relics", after all; he changed the character to Scotty knowing full well it ignored his own earlier script.
There tend to be these kinds of minor mistakes in a lot of Ron Moore's scripts. Though I doubt it was something he, Braga and Berman weren't aware of. The
Generations script originally was supposed to feature Kirk, Spock and McCoy in the prologue. When Nimoy and Kelley passed on the film, it went to the others. When they signed Doohan, it was likely brushed under the rug to facilitate the film, which had a lot riding on it and h
ardly worth breaking their backs over one throwaway line in an episode that had aired two years prior.
The aforementioned continuity error with Scotty between "Relics" and
Generations (which I've seen explained away by way of Scotty being disoriented after re-materializing after being in the buffer for so long).
Another error like this in the episode -- the Enterprise beaming Geordi and Scotty away at the last second despite the Jenolen's shields still being up.
Yet another (just off the top of my head) is the admiral at the end of
DS9's "Doctor Bashir, I Presume?" when the admiral makes some comment about Khan "two hundred years ago" - which Ron Moore sheepishly admitted was because he had Khan's line "Two hundred years ago on Earth, I was a prince!" stuck in his head, despite the fact that
DS9 took place nearly a hundred years after
The Wrath of Khan.
I don't really mind these glitches; Ron Moore has brushed them off as honest mistakes but also very minor ones not worth getting upset over. That's how I prefer to look at them.