Don't perform swap when src == dst. #5041

r?