[minor] Optimize for cases where we already have an id.