Arrays.deepEquals has a bizzare behavior. For example,
Arrays.deepEquals(new Object[0], new boolean[0][]) == true.
To avoid this, we're doing its work ourselves, but insisting that for
two arrays to be equal, they must have the same component type (i.e. the
same type).