Fixed a bug in the array version of union.