I first though `resolveRef` would validate keypath, but it seems not.
@Rich-Harris Are there any method that validates a keypath? I think after we change so it validates keypath it should be fine to merge this.