Fix PR2267, by allowing indirect outputs to be intermixed