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

Change-Id: I221d974ba9402c088235d5bdb3c94e91cf4167ba