Fix magn1571: indexing into string does not work properly
Add more test cases for string indexing
Merge pull request #1618 from ke-yu/fix_magn1571

Fix magn1571: indexing into string does not work properly