Fix two problems in ast_str functions found while writing a unit test.