Merge "Add more defensive code to detect invalid indices in text data" into tizen_4.0