[DF-4571] small performance fix in YamlParser::Parse.