[Yaml] fixed ignored text when parsing an inlined mapping or sequence (closes #6786)