This needs to be after the ensureCapacity - since self can be reallocated.