Added identical? optimization to diffing.