Manually implement Hash for TreeMap (but still derive hash for TreeSet