I think you need to lock in this method to avoid a race condition between GetOrCreateShard incrementing the refcount and this method checking it