[automerger] Fix crash during cursor moving on BiDi text am: 82c84d5fbb am: 12baaa2bc3

Change-Id: Iaf0aded3004f33fdb52dd0c19779329991b24746