Fix yamlBuilder() to return YAML builder instead of SMILE

Closes #5185