Fix performance regression in constructing new alignments.