Test for the presence of a yaml parsing log message. Fixes #6714.

Additionally, moved the yaml syntax error checking to the proper place.
Merge pull request #7858 from s0undt3ch/issues/6714

Test for the presence of a yaml parsing log message. Fixes #6714.