NavMeshAgent bug in Unity 5? (updatePosition = false, updateRotation = false)

I have AI script attached to GameObject with rigidbody and NavMeshAgent components. NavMeshAgent is used only for path calculation, not for actual moving of the object:

agent = gameObject.GetComponent<NavMeshAgent> ();
agent.updateRotation = false;
agent.updatePosition = false;

Script worked fine, but after updating Unity from 4 to 5 I noticed changes in NavMeshAgent behavior. It looks like NavMeshAgent has its own transform and not using the attached gameobject’s one. So, when updatePosition and updateRotation are set to false, NavMeshAgent is not moving the object (which is good), but instead traveling solo to the target! (see screenshots).

Any idea what was changed in Unity 5 and how to workaround this?

NavMeshAgent.nextPosition gets or sets the simulation position of the navmesh agent. You should do this:

GetComponent<NavMeshAgent>().nextPosition = transform.position;