Go back before they started writing the film and make sure that Stewart and Spiner have absolutely no input. Then go with Piller's idea of serium krellide as the basis for all Federation medical technology.
In fairness though, based on Piller's book, the first script was thrown out without Stewart ever seeing it. Berman rejected it based on what he thought the lead might
say, which is hardly Stewart's fault. If anything he seemed to have brought it back closer to the original idea.
And I also think Spiner should have been listened to more, his concerns that Data was being written appalling in a style that ignored years of character development was pretty much bang on the money. Frankly I wish he'd been prepared to make more of a push against it.
Hell, if the studio's notes (especially the one on making the Ba' Ku argument stronger) had been listened to more we'd have a better film. And how often is that the case?