
I do know it was mostly meant to be a light-hearted comedy sight gag, how Scotty would be put off by a Klingon serving on the Enterprise, but in hindsight, I really wish they hadn't done it, at least not that bit at the end. It can be interpreted as kind of prejudiced, & while I'm sure, at 1st, it might surprise or shock Scotty, I'd imagine that by the end, he'd be just fine with it. Scotty is no bigot imho, & Worf is a pretty fair & decent guy once you get past the introduction.
Frankly, Scotty didn't really win points with any of the crew. He butt heads with Geordi until they worked it out. His comment about "Prettier doctors" to Crusher was pretty sexist &/or creepy, & while Troi gave him a hug at the end, he never really got shown with her at all, despite the fact that he clearly needed someone to help him out with his retirement funk (Who better than the ship's counselor?) In fact, WTF is Troi doing? This is exactly the kind of person who needs her help, just like the cryo-peeps they found in The Neutral Zone.
Interesting side note, the original script has one scene with Scotty/Troi, after LaForge runs him down, & before his trip to 10-F, where Scotty runs her off for being a head shrinker
Even though they all act like he's a close personal friend at the end, during the episode, the only one who seemed at all sympathetic to him was Picard, & I guess Data slightly, which was less about sympathy or bonding, & more about intrigue. Heck, even his "Synthetic Commanders" remark was pretty insensitive
While I've always thought Geordi could've been a lot less hostile to Scotty, in his run down, it is also kind of hard to not notice how off-putting Scotty was to them. I realize the guy's going through a tough time in his life, but these people only wanted to help, & he doesn't seem to be very gracious about that, or very considerate of the fact that regardless of how many years have passed, these are HIS people... Starfleet. He could've been found by a ship full of Ferengi