When the missing variable was not defined, we would get an exception as a string doesn't contain provenance information.
This was broken during the yaml refactor
Changes proposed in this merge request: