Fix bug which could generate a NegativeArraySizeException when performing large (>40M) row union operations