Train deduplication