Shouldn't the physics update come as one of the last steps? The process should go like this:

1. Apply changes made from script thread
2. Update physics state
3. Push physics changes to script thread