Avoid even more clones by taking refCount into account.

Change-Id: I5da774515d5493166a197b5814d0a720628cfaff