Fixing handling of non-world frame velocities in setModelState.

For issue #240