Of course, the Rhapsody consists of 24 variations, but the 18th variation has a life of its own, and that’s what’s quoted in “Somewhere in Time”. IIRC, in the original Richard Matheson novel, “Bid Time Return”, the piece was Mahler’s 9th Symphony.
Yes, I recently read the history of the novel on which “Somewhere in Time is based on” and appreciate the choice of Rachmaninoff’s Rhapsody on the Theme on Pagnini for the film as it works and flows with the story perfectly.