Fix problem with hstack and duplicate input tables