When scheduling a trip across the space elevator either from Nauvis orbit or surface, the schedule will include the wrong elevator for the first side. This appears to only happen when a train from the opposite surface is scheduled both a pickup and dropoff on the same surface opposite to its current depot.
I found the error is in the source code on line 126 in ltn-delivery.lua where the train is sent to the closest stop to the 'from' stop if it is on the opposite surface. It should instead go to the closest stop to the loco instead. When I changed this in the code, the problem was fixed.