Spock already upgraded Scotty's tech knowledge a leap or two to get Scotty and Kirk back aboard the Enterprise at warp. It's that old Star Trek IV: The Voyage Home Idea when Scotty gave that industrial mogul the formula for transparent aluminum. "Somebody had to invent the thing!". The problem with that little glitch, is that that industrial mogul didn't invent that technology, it was given to him. That kind of thing definitely qualifies as a violation of the temporal prime directive.
"One of the many, the proud, the friends of Zardoz".