fix --end handling in srvderive, RT#10574