The effect of end-cell stability on the confinement of the central-cell plasma in TMX