Fixed index out of bounds in term.isWide, closes #484.