Fixing OutOfBoundsException in str[x..y]. Now it throws the proper FreeMarker error message instead.