Backport of "subparse: don't try to index string with -1" into 1.20
requested to merge tpm/gstreamer:backport-mr-2147-into-1.20-subparse-avoid-negative-indexing-string into 1.20
Backport of !2147 (merged) "subparse: don't try to index string with -1".
Commits:
- c2ac57f6 subparse: don't try to index string with -1