lib/standard/string: reverse iterator fix on substring. Fixes #709