Correctly handle 0 in str-slice.

Closes #1330