Fixed handling of substrings in Ada backend