Handle recursion in Array#eql? and Array#==.