The reason I put this here is because I had to modify the original code to make this work -- placing a ```np.all()``` call around the comparison ```cube.attributes[key] == cubes[0].attributes[key]```.
It seems we often forget that attributes may be arrays, in which case comparing with ```==``` will cause exceptions.  For instance, ```is_compatible``` also currently gets this wrong.
I am going to raise this as a more general issue.