Optimize `_.isEqual` by using `_.keys`.