Actually, a solution where this data is in two files really isn't all that typical for current FIleMaker systems though it was once the only way you could set this up back before the release of Filemaker 7.
What version of FileMaker are you using? And are you using FileMaker Pro or FileMaker Advanced?
Nothing intrinsically wrong with using separate files, but it does complicate the process in how your database functions.
A sort records step cannot change what records are present in the found set. Either your GTRR step does not have the "Match Current Record Only" option specified or some other part of your system is interfering and changing what records appear after you sort the records.
If you have FileMaker Advanced, you might try running your script with the sort records step included while the script debugger is enabled. That might help you spot what is altering your found set.
I'm using fm11pro Advanced. But Thanks for the tip. Ill try it