Bug 849688 - Crash with getStartPositionOfChar when argument is out of range. r=dholbert