Only set the different flag when necessary.