Further improvements for ticket merge performance.