Fix recursive function call when updating entity orientation.