Fixed a bug in the union/intersection code.