Swap DOM elements to further reduce flickering.