Added bound test in primary_substring
Fix in Ada backend substrings