Fix an infinite loop when checking sets formed by unions (using 'or'), and make empty sets print better.